From: Kbwms AT aol DOT com Message-ID: <193.1e4fa777.2c6a8a99@aol.com> Date: Tue, 12 Aug 2003 14:23:21 EDT Subject: Re: djgpp/tests/cygnus/sprint_ivec.c broken? To: djgpp-workers AT delorie DOT com MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="part1_193.1e4fa777.2c6a8a99_boundary" X-Mailer: 8.0 for Windows sub 6011 Reply-To: djgpp-workers AT delorie DOT com --part1_193.1e4fa777.2c6a8a99_boundary Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit In a message dated 8/12/2003 1:49:57 PM Eastern Standard Time, ams AT ludd DOT luth DOT se writes: > 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? > As I recall, the # flag is ignored with c, d, i, u, or s conversions. Problem? --part1_193.1e4fa777.2c6a8a99_boundary Content-Type: text/html; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable In a message dated 8/12/2003 1:49:57 PM Eastern Standard= Time, ams AT ludd DOT luth DOT se writes:

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?


As I recall, the # flag is ignored with c, d, i, u, or s conversions. =20= Problem?
--part1_193.1e4fa777.2c6a8a99_boundary--