public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/32256] New: pragma system_header doesn't suppress warnings in tree-cfg
@ 2007-06-08 15:30 pcarlini at suse dot de
2007-06-08 16:53 ` [Bug c++/32256] " pcarlini at suse dot de
` (10 more replies)
0 siblings, 11 replies; 12+ messages in thread
From: pcarlini at suse dot de @ 2007-06-08 15:30 UTC (permalink / raw)
To: gcc-bugs
Hi, this header (header.h):
#pragma GCC system_header
int noreturn() { }
included by (file.cc):
#include "header.h"
void ok() { }
Leads to:
paolo:~/Work> g++ -Wall -c file.cc
header.h: In function 'int noreturn()':
header.h:2: warning: control reaches end of non-void function
Note, this problem doesn't happen if file.cc is compiled as C, thus the problem
apparently is the C++ front-end not setting TREE_NO_WARNING on the decl or
something similar...
--
Summary: pragma system_header doesn't suppress warnings in tree-
cfg
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pcarlini at suse dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32256
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/32256] pragma system_header doesn't suppress warnings in tree-cfg
2007-06-08 15:30 [Bug c++/32256] New: pragma system_header doesn't suppress warnings in tree-cfg pcarlini at suse dot de
@ 2007-06-08 16:53 ` pcarlini at suse dot de
2007-06-30 9:18 ` [Bug c++/32256] [4.0/4.1/4.2/4.3 regression] " pinskia at gcc dot gnu dot org
` (9 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: pcarlini at suse dot de @ 2007-06-08 16:53 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pcarlini at suse dot de 2007-06-08 16:53 -------
In fact, the problem is of the same type of that in C++/30500: in C++ only when
execute_warn_function_return begins in_system_header is zero (in C is 1 and all
the warnings are suppressed because diagnostic_report_warnings_p is false)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32256
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/32256] [4.0/4.1/4.2/4.3 regression] pragma system_header doesn't suppress warnings in tree-cfg
2007-06-08 15:30 [Bug c++/32256] New: pragma system_header doesn't suppress warnings in tree-cfg pcarlini at suse dot de
2007-06-08 16:53 ` [Bug c++/32256] " pcarlini at suse dot de
@ 2007-06-30 9:18 ` pinskia at gcc dot gnu dot org
2007-07-04 3:25 ` mmitchel at gcc dot gnu dot org
` (8 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-06-30 9:18 UTC (permalink / raw)
To: gcc-bugs
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |pinskia at gcc dot gnu dot
| |org
Target Milestone|--- |4.1.3
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32256
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/32256] [4.0/4.1/4.2/4.3 regression] pragma system_header doesn't suppress warnings in tree-cfg
2007-06-08 15:30 [Bug c++/32256] New: pragma system_header doesn't suppress warnings in tree-cfg pcarlini at suse dot de
2007-06-08 16:53 ` [Bug c++/32256] " pcarlini at suse dot de
2007-06-30 9:18 ` [Bug c++/32256] [4.0/4.1/4.2/4.3 regression] " pinskia at gcc dot gnu dot org
@ 2007-07-04 3:25 ` mmitchel at gcc dot gnu dot org
2007-11-02 20:43 ` tromey at gcc dot gnu dot org
` (7 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2007-07-04 3:25 UTC (permalink / raw)
To: gcc-bugs
--
mmitchel at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32256
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/32256] [4.0/4.1/4.2/4.3 regression] pragma system_header doesn't suppress warnings in tree-cfg
2007-06-08 15:30 [Bug c++/32256] New: pragma system_header doesn't suppress warnings in tree-cfg pcarlini at suse dot de
` (2 preceding siblings ...)
2007-07-04 3:25 ` mmitchel at gcc dot gnu dot org
@ 2007-11-02 20:43 ` tromey at gcc dot gnu dot org
2007-11-02 20:53 ` pcarlini at suse dot de
` (6 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: tromey at gcc dot gnu dot org @ 2007-11-02 20:43 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from tromey at gcc dot gnu dot org 2007-11-02 20:43 -------
You can reproduce this in C by using -funit-at-a-time.
IMO this is a general bug in unit-at-a-time.
Perhaps cgraph_analyze_function or something similar should set
in_system_header. Maybe set_cfun.
--
tromey at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |tromey at gcc dot gnu dot
| |org
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2007-11-02 20:43:14
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32256
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/32256] [4.0/4.1/4.2/4.3 regression] pragma system_header doesn't suppress warnings in tree-cfg
2007-06-08 15:30 [Bug c++/32256] New: pragma system_header doesn't suppress warnings in tree-cfg pcarlini at suse dot de
` (3 preceding siblings ...)
2007-11-02 20:43 ` tromey at gcc dot gnu dot org
@ 2007-11-02 20:53 ` pcarlini at suse dot de
2007-11-02 21:02 ` tromey at gcc dot gnu dot org
` (5 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: pcarlini at suse dot de @ 2007-11-02 20:53 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from pcarlini at suse dot de 2007-11-02 20:53 -------
Thanks Tom, your help is appreciated. Note we have also c++/32368: shall we
recategorize both as middle-end bugs then?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32256
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/32256] [4.0/4.1/4.2/4.3 regression] pragma system_header doesn't suppress warnings in tree-cfg
2007-06-08 15:30 [Bug c++/32256] New: pragma system_header doesn't suppress warnings in tree-cfg pcarlini at suse dot de
` (4 preceding siblings ...)
2007-11-02 20:53 ` pcarlini at suse dot de
@ 2007-11-02 21:02 ` tromey at gcc dot gnu dot org
2007-11-02 21:12 ` pcarlini at suse dot de
` (4 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: tromey at gcc dot gnu dot org @ 2007-11-02 21:02 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from tromey at gcc dot gnu dot org 2007-11-02 21:02 -------
Recategorizing is fine by me -- though I wouldn't consider my opinion
authoritative :)
FWIW I have a patch to set_cfun that appears to fix both these bugs.
I'll bootstrap and test it and see what people think.
--
tromey at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |tromey at gcc dot gnu dot
|dot org |org
Status|NEW |ASSIGNED
Last reconfirmed|2007-11-02 20:43:14 |2007-11-02 21:02:27
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32256
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/32256] [4.0/4.1/4.2/4.3 regression] pragma system_header doesn't suppress warnings in tree-cfg
2007-06-08 15:30 [Bug c++/32256] New: pragma system_header doesn't suppress warnings in tree-cfg pcarlini at suse dot de
` (5 preceding siblings ...)
2007-11-02 21:02 ` tromey at gcc dot gnu dot org
@ 2007-11-02 21:12 ` pcarlini at suse dot de
2007-11-06 15:57 ` tromey at gcc dot gnu dot org
` (3 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: pcarlini at suse dot de @ 2007-11-02 21:12 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from pcarlini at suse dot de 2007-11-02 21:12 -------
Cool. Then maybe recategorizing is now just a waste of time ;)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32256
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/32256] [4.0/4.1/4.2/4.3 regression] pragma system_header doesn't suppress warnings in tree-cfg
2007-06-08 15:30 [Bug c++/32256] New: pragma system_header doesn't suppress warnings in tree-cfg pcarlini at suse dot de
` (6 preceding siblings ...)
2007-11-02 21:12 ` pcarlini at suse dot de
@ 2007-11-06 15:57 ` tromey at gcc dot gnu dot org
2007-11-06 16:01 ` [Bug c++/32256] [4.0/4.1/4.2 " tromey at gcc dot gnu dot org
` (2 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: tromey at gcc dot gnu dot org @ 2007-11-06 15:57 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from tromey at gcc dot gnu dot org 2007-11-06 15:57 -------
Subject: Bug 32256
Author: tromey
Date: Tue Nov 6 15:57:02 2007
New Revision: 129936
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=129936
Log:
gcc
PR c++/32256, PR c++/32368:
* function.c (saved_in_system_header): New global.
(push_cfun): Save in_system_header.
(pop_cfun): Restore in_system_header.
(push_struct_function): Save in_system_header.
gcc/testsuite
PR c++/32368:
* g++.dg/warn/pragma-system_header3.h: New.
* g++.dg/warn/pragma-system_header3.C: New.
PR c++/32256:
* g++.dg/warn/pragma-system_header4.C: New.
* g++.dg/warn/pragma-system_header4.h: New.
Added:
trunk/gcc/testsuite/g++.dg/warn/pragma-system_header3.C
trunk/gcc/testsuite/g++.dg/warn/pragma-system_header3.h
trunk/gcc/testsuite/g++.dg/warn/pragma-system_header4.C
trunk/gcc/testsuite/g++.dg/warn/pragma-system_header4.h
Modified:
trunk/gcc/ChangeLog
trunk/gcc/function.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32256
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/32256] [4.0/4.1/4.2 regression] pragma system_header doesn't suppress warnings in tree-cfg
2007-06-08 15:30 [Bug c++/32256] New: pragma system_header doesn't suppress warnings in tree-cfg pcarlini at suse dot de
` (7 preceding siblings ...)
2007-11-06 15:57 ` tromey at gcc dot gnu dot org
@ 2007-11-06 16:01 ` tromey at gcc dot gnu dot org
2007-11-06 17:24 ` pcarlini at suse dot de
2008-03-14 16:51 ` [Bug c++/32256] [4.2 Regression] " rguenth at gcc dot gnu dot org
10 siblings, 0 replies; 12+ messages in thread
From: tromey at gcc dot gnu dot org @ 2007-11-06 16:01 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from tromey at gcc dot gnu dot org 2007-11-06 16:01 -------
Fixed on trunk.
--
tromey at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to work|3.4.4 |3.4.4 4.3.0
Summary|[4.0/4.1/4.2/4.3 regression]|[4.0/4.1/4.2 regression]
|pragma system_header doesn't|pragma system_header doesn't
|suppress warnings in tree- |suppress warnings in tree-
|cfg |cfg
Target Milestone|4.1.3 |4.3.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32256
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/32256] [4.0/4.1/4.2 regression] pragma system_header doesn't suppress warnings in tree-cfg
2007-06-08 15:30 [Bug c++/32256] New: pragma system_header doesn't suppress warnings in tree-cfg pcarlini at suse dot de
` (8 preceding siblings ...)
2007-11-06 16:01 ` [Bug c++/32256] [4.0/4.1/4.2 " tromey at gcc dot gnu dot org
@ 2007-11-06 17:24 ` pcarlini at suse dot de
2008-03-14 16:51 ` [Bug c++/32256] [4.2 Regression] " rguenth at gcc dot gnu dot org
10 siblings, 0 replies; 12+ messages in thread
From: pcarlini at suse dot de @ 2007-11-06 17:24 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from pcarlini at suse dot de 2007-11-06 17:24 -------
Thanks a lot, Tom!
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32256
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/32256] [4.2 Regression] pragma system_header doesn't suppress warnings in tree-cfg
2007-06-08 15:30 [Bug c++/32256] New: pragma system_header doesn't suppress warnings in tree-cfg pcarlini at suse dot de
` (9 preceding siblings ...)
2007-11-06 17:24 ` pcarlini at suse dot de
@ 2008-03-14 16:51 ` rguenth at gcc dot gnu dot org
10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-03-14 16:51 UTC (permalink / raw)
To: gcc-bugs
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |diagnostic
Known to fail|4.0.3 |4.0.4 4.1.3 4.2.3
Summary|[4.0/4.1/4.2 regression] |[4.2 Regression] pragma
|pragma system_header doesn't|system_header doesn't
|suppress warnings in tree- |suppress warnings in tree-
|cfg |cfg
Target Milestone|4.3.0 |4.2.4
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32256
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2008-03-14 16:51 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-06-08 15:30 [Bug c++/32256] New: pragma system_header doesn't suppress warnings in tree-cfg pcarlini at suse dot de
2007-06-08 16:53 ` [Bug c++/32256] " pcarlini at suse dot de
2007-06-30 9:18 ` [Bug c++/32256] [4.0/4.1/4.2/4.3 regression] " pinskia at gcc dot gnu dot org
2007-07-04 3:25 ` mmitchel at gcc dot gnu dot org
2007-11-02 20:43 ` tromey at gcc dot gnu dot org
2007-11-02 20:53 ` pcarlini at suse dot de
2007-11-02 21:02 ` tromey at gcc dot gnu dot org
2007-11-02 21:12 ` pcarlini at suse dot de
2007-11-06 15:57 ` tromey at gcc dot gnu dot org
2007-11-06 16:01 ` [Bug c++/32256] [4.0/4.1/4.2 " tromey at gcc dot gnu dot org
2007-11-06 17:24 ` pcarlini at suse dot de
2008-03-14 16:51 ` [Bug c++/32256] [4.2 Regression] " rguenth at gcc dot gnu dot 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).