Mail Archives: djgpp-workers/2003/08/17/06:45:56
According to Kbwms AT aol DOT com:
> 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.
...
> > 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.
...
> As I recall, the # flag is ignored with c, d, i, u, or s conversions.
> Problem?
Yes. What must we do if one of those fail? Nothing, because we're
allowed to do anything. (We may be interested in correcting it anyway
to be (un)kind to coders that relies on undefined behaviour.)
However the illegal tests are sprinkled all over the test array. I
would have put them separate from the valid tests with a comment
/* These are test of certain extensions of sprintf, which may or may
not work as expected. */.
Right,
MartinS
- Raw text -