public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug driver/48439] New: gcc fails to resume the normal treatment when -isystem has finished
@ 2011-04-04 20:28 Denis.Excoffier at airbus dot com
  2011-04-05  5:16 ` [Bug driver/48439] " Denis.Excoffier at airbus dot com
  2021-08-28  4:37 ` [Bug middle-end/48439] " pinskia at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: Denis.Excoffier at airbus dot com @ 2011-04-04 20:28 UTC (permalink / raw)
  To: gcc-bugs

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.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug driver/48439] gcc fails to resume the normal treatment when -isystem has finished
  2011-04-04 20:28 [Bug driver/48439] New: gcc fails to resume the normal treatment when -isystem has finished Denis.Excoffier at airbus dot com
@ 2011-04-05  5:16 ` Denis.Excoffier at airbus dot com
  2021-08-28  4:37 ` [Bug middle-end/48439] " pinskia at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: Denis.Excoffier at airbus dot com @ 2011-04-05  5:16 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48439

--- Comment #1 from Denis Excoffier <Denis.Excoffier at airbus dot com> 2011-04-05 05:16:29 UTC ---
A simpler test case is

% cat c1.h
void b() {}
%


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug middle-end/48439] gcc fails to resume the normal treatment when -isystem has finished
  2011-04-04 20:28 [Bug driver/48439] New: gcc fails to resume the normal treatment when -isystem has finished Denis.Excoffier at airbus dot com
  2011-04-05  5:16 ` [Bug driver/48439] " Denis.Excoffier at airbus dot com
@ 2021-08-28  4:37 ` pinskia at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-28  4:37 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48439

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|driver                      |middle-end
             Status|UNCONFIRMED                 |RESOLVED
   Target Milestone|---                         |10.0
         Resolution|---                         |WONTFIX

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
The warning was removed at r10-3027 with the removal of those two options so I
am just going to close as won't fix.
This might have been fixed in another way too anyways.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-08-28  4:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-04 20:28 [Bug driver/48439] New: gcc fails to resume the normal treatment when -isystem has finished Denis.Excoffier at airbus dot com
2011-04-05  5:16 ` [Bug driver/48439] " Denis.Excoffier at airbus dot com
2021-08-28  4:37 ` [Bug middle-end/48439] " pinskia at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).