delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2003/08/12/13:43:10

From: <ams AT ludd DOT luth DOT se>
Message-Id: <200308121729.h7CHT3QR002681@speedy.ludd.luth.se>
Subject: djgpp/tests/cygnus/sprint_ivec.c broken?
To: DJGPP-WORKERS <djgpp-workers AT delorie DOT com>
Date: Tue, 12 Aug 2003 19:29:03 +0200 (CEST)
X-Mailer: ELM [version 2.4ME+ PL78 (25)]
MIME-Version: 1.0
X-MailScanner: Found to be clean
Reply-To: djgpp-workers AT delorie DOT com

Hello.

I've noticed that there are a lot of sprintf specifications that has
the "#" flag for the "d" conversion in
djgpp/tests/cygnus/sprint_ivec.c.

E. g. lines 125 and 126:
__LINE__, 0x001dc6bb,   "1951419", "%#4ld",
__LINE__, 0x00000868,   "  2152", "%#6d",

This is weird and IMO broken, because the standard says that the "#"
flag is only valid for the o, x, X, a, A, e, E, f, F, g and G
conversions and undefined behaviour for the other conversions.

It's broken because having tests that relies on undefined behaviour
doesn't make sense.

Comments?


Right,

						MartinS

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019