From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22662 invoked by alias); 4 Apr 2011 20:28:24 -0000 Received: (qmail 22652 invoked by uid 22791); 4 Apr 2011 20:28:24 -0000 X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 04 Apr 2011 20:28:18 +0000 From: "Denis.Excoffier at airbus dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug driver/48439] New: gcc fails to resume the normal treatment when -isystem has finished X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: driver X-Bugzilla-Keywords: X-Bugzilla-Severity: minor X-Bugzilla-Who: Denis.Excoffier at airbus dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Mon, 04 Apr 2011 20:28:00 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2011-04/txt/msg00325.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48439 Summary: gcc fails to resume the normal treatment when -isystem has finished Product: gcc Version: 4.6.0 Status: UNCONFIRMED Severity: minor Priority: P3 Component: driver AssignedTo: unassigned@gcc.gnu.org ReportedBy: Denis.Excoffier@airbus.com A command line with both `-fbranch-target-load-optimize' and `-fbranch-target-load-optimize2' is typically a mistake. This mistake should not be reported when found from within a directory included using -isystem (it is not). However, it should be reported when found from within the main file. See below: the fourth (and last) command line should produce the same message as for the second one. % % cat a.cc #if defined(INCLUDED) #include #endif void a() {} % % cat c1.h class c1 { ~c1(void); }; c1::~c1(void) {} % % gcc --version | head -1 gcc (GCC) 4.6.0 % % set o = "-O -Werror -fbranch-target-load-optimize -fbranch-target-load-optimize2" % % gcc -o a.o -UINCLUDED -I . $o -c a.cc a.cc: In function 'void a()': a.cc:4:11: error: branch target register load optimization is not intended to be run twice [-Werror] cc1plus: all warnings being treated as errors % gcc -o a.o -UINCLUDED -isystem . $o -c a.cc a.cc: In function 'void a()': a.cc:4:11: error: branch target register load optimization is not intended to be run twice [-Werror] cc1plus: all warnings being treated as errors % gcc -o a.o -DINCLUDED -I . $o -c a.cc In file included from a.cc:2:0: ./c1.h: In destructor 'c1::~c1()': ./c1.h:4:16: error: branch target register load optimization is not intended to be run twice [-Werror] cc1plus: all warnings being treated as errors % gcc -o a.o -DINCLUDED -isystem . $o -c a.cc % ls a.o a.o % I'm not so proud of this bug, sorry for it.