This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
Re: c/10719: invalid code generated (x86, "int $5") with__builtin_va_arg(va, char);
- From: "Joseph S. Myers" <jsm28 at cam dot ac dot uk>
- To: nobody at gcc dot gnu dot org
- Cc: gcc-prs at gcc dot gnu dot org,
- Date: 12 May 2003 14:46:01 -0000
- Subject: Re: c/10719: invalid code generated (x86, "int $5") with__builtin_va_arg(va, char);
- Reply-to: "Joseph S. Myers" <jsm28 at cam dot ac dot uk>
The following reply was made to PR c/10719; it has been noted by GNATS.
From: "Joseph S. Myers" <jsm28@cam.ac.uk>
To: sbiallas@online-club.de
Cc: rth@gcc.gnu.org, gcc-bugs@gcc.gnu.org, sb@biallas.net,
gcc-gnats@gcc.gnu.org
Subject: Re: c/10719: invalid code generated (x86, "int $5") with
__builtin_va_arg(va, char);
Date: Mon, 12 May 2003 15:45:24 +0100 (BST)
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