c/10719: invalid code generated (x86, "int $5") with __builtin_va_arg(va, char);
Joseph S. Myers
jsm28@cam.ac.uk
Mon May 12 15:11:00 GMT 2003
On Mon, 12 May 2003 sbiallas@online-club.de wrote:
> I can't agree with this: gcc shouldn't generate
> invalid code on purpose. It knows there is an
> error and should generate an error and not a
> warning. The warning is misleading (it sounds like
> gcc found a problem and corrected it) and will
> probably not recognized.
Please read the response to Defect Report #109. This code only yields
undefined behavior if it is ever executed, and it might not be, so GCC
must not yield an error. To quote the response:
A conforming implementation must not fail to translate a strictly
conforming program simply because _some_ possible execution of that
program would result in undefined behavior.
http://std.dkuug.dk/JTC1/SC22/WG14/www/docs/dr_109.html
--
Joseph S. Myers
jsm28@cam.ac.uk
More information about the Gcc-bugs
mailing list