[Bug driver/48439] New: gcc fails to resume the normal treatment when -isystem has finished
Denis.Excoffier at airbus dot com
gcc-bugzilla@gcc.gnu.org
Mon Apr 4 20:28:00 GMT 2011
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 <c1.h>
#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.
More information about the Gcc-bugs
mailing list