From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27460 invoked by alias); 12 May 2003 14:46:02 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 27371 invoked by uid 71); 12 May 2003 14:46:01 -0000 Date: Mon, 12 May 2003 14:46:00 -0000 Message-ID: <20030512144601.27370.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: "Joseph S. Myers" Subject: Re: c/10719: invalid code generated (x86, "int $5") with __builtin_va_arg(va, char); Reply-To: "Joseph S. Myers" X-SW-Source: 2003-05/txt/msg01232.txt.bz2 List-Id: The following reply was made to PR c/10719; it has been noted by GNATS. From: "Joseph S. Myers" 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