Mail Archives: djgpp-workers/2003/08/12/13:43:10
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 -