Mail Archives: djgpp-workers/2002/12/11/09:29:40
> > > The code that causes the buffer overflow is the special handling
> > > for capitalised letters (for compatibility with Borland C) - D, I, U
> > > and O. For some reason X was included in this too. I think the code
> > > mistakenly sets 'size' to LONG for X. I think it should leave it alone
> > > and let 'size' be set by the normal mechanisms - 'h', 'l', 'll', etc.
> >
> > I recall vaguely that some Borland compatibility is involved here.
> > Can someone please check with Borland C and Turbo C?
E - same as e with E for exponent
G - same as g with G for exponent
X - same as x with capital ABCDEF in output
D,I,U,O are not mentioned (C++ 3.0 docs, what I have handy) - so I
don't think these are Borland. Maybe something else.
> In section 7.19.6.2, point 14 of the C99 standard (numbered page 286, but
> actually page 300 of the PDF):
>
> "The conversion specifiers A, E, F, G, and X are also valid and behave the
> same as,
> respectively, a, e, f, g, and x."
>
> So we can't treat X as some Borland special-case, if we want to comply with
> the C standard.
Well, if you expect output in capitals, that's a minor thing for the coder
to fix...
- Raw text -