From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28824 invoked by alias); 12 May 2003 13:56: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 28761 invoked by uid 71); 12 May 2003 13:56:01 -0000 Date: Mon, 12 May 2003 13:56:00 -0000 Message-ID: <20030512135601.28756.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: sbiallas@online-club.de Subject: Re: c/10719: invalid code generated (x86, "int $5") with __builtin_va_arg(va, char); Reply-To: sbiallas@online-club.de X-SW-Source: 2003-05/txt/msg01226.txt.bz2 List-Id: The following reply was made to PR c/10719; it has been noted by GNATS. From: sbiallas@online-club.de To: rth@gcc.gnu.org, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, nobody@gcc.gnu.org, sb@biallas.net, gcc-gnats@gcc.gnu.org Cc: Subject: Re: c/10719: invalid code generated (x86, "int $5") with __builtin_va_arg(va, char); Date: Mon, 12 May 2003 15:46:55 +0200 (MEST) >Not a bug. This is in fact a feature. As you note, the code >is bad and you should use "int". There is no sensible code >that could be generated. 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. With the same attitude you could easily allow instantiating a class with abstract functions and segv when an abstract function is called. Additionally "int $5" is a very bad way of indicating bad code. This would for example trigger a "print screen" on DOS or could even be a syscall on other systems. Regards, Sebastian