public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/14172] g++ should not emit effc++ warnings in system headers
[not found] <bug-14172-6883@http.gcc.gnu.org/bugzilla/>
@ 2005-11-26 9:08 ` gdr at gcc dot gnu dot org
0 siblings, 0 replies; 5+ messages in thread
From: gdr at gcc dot gnu dot org @ 2005-11-26 9:08 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from gdr at gcc dot gnu dot org 2005-11-26 09:08 -------
(In reply to comment #0)
> Some warning options trigger warnings in standard C++ headers, rendering
> -Werror
> unusable. This can be seen with a simple example:
>
> #include <list>
> int main()
> {
> std::list<int> foo;
> }
>
>
> When compiling with g++ -Weffc++ -Werror foo.cpp a lot of warnings about STL
> classes are emitted.
> While the gcc manual already mentions that -Weffc++ could produce spurious
> warnings, the same problems occurs with -Winline (I can try to produce a
> minimal
> test case if required). I think the compiler should ignore warnings in these
> files, as the user cannot fix them.
>
The real problem, as I understand it, is that we used to forget to copy
the in_system_header marker from templates when doing instantiations.
I think Mark Mitchell fixed that behaviour recently.
At any case, mainline GCC (4.2.x) issues no warning with your testcase.
-- Gaby
--
gdr at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.2.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14172
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/14172] g++ should not emit effc++ warnings in system headers
2004-02-17 9:54 [Bug c++/14172] New: g++ should ignore warnings in STL headers tneumann at pi3 dot informatik dot uni-mannheim dot de
` (2 preceding siblings ...)
2004-11-23 10:18 ` matthew at linuxfromscratch dot org
@ 2005-02-22 10:28 ` pinskia at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-02-22 10:28 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |pinskia at gcc dot gnu dot
| |org
Last reconfirmed|2004-11-14 07:13:14 |2005-02-22 01:44:32
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14172
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/14172] g++ should not emit effc++ warnings in system headers
2004-02-17 9:54 [Bug c++/14172] New: g++ should ignore warnings in STL headers tneumann at pi3 dot informatik dot uni-mannheim dot de
2004-02-17 16:29 ` [Bug c++/14172] g++ should not emit effc++ warnings in system headers giovannibajo at libero dot it
2004-11-19 7:51 ` matthew at linuxfromscratch dot org
@ 2004-11-23 10:18 ` matthew at linuxfromscratch dot org
2005-02-22 10:28 ` pinskia at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: matthew at linuxfromscratch dot org @ 2004-11-23 10:18 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From matthew at linuxfromscratch dot org 2004-11-23 10:18 -------
Would someone mind commenting on what needs to happen with this bug please? My
testing has shown that the behaviour of -Weffc++ is correct with regard to
system headers. The problem is that some of the headers in
/usr/include/c++/$gcc-version/bits aren't treated as system headers. This
doesn't just affect -Weffc++, it actually affects *all* warning options (e.g.
-Wunreachable-code is often triggered by such headers IIRC). Does the bug
summary need changing? What about the component? (I suspect this is now in the
realm of libstdc++). It seems closely related to bug 12854.
Thanks,
Matt
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14172
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/14172] g++ should not emit effc++ warnings in system headers
2004-02-17 9:54 [Bug c++/14172] New: g++ should ignore warnings in STL headers tneumann at pi3 dot informatik dot uni-mannheim dot de
2004-02-17 16:29 ` [Bug c++/14172] g++ should not emit effc++ warnings in system headers giovannibajo at libero dot it
@ 2004-11-19 7:51 ` matthew at linuxfromscratch dot org
2004-11-23 10:18 ` matthew at linuxfromscratch dot org
2005-02-22 10:28 ` pinskia at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: matthew at linuxfromscratch dot org @ 2004-11-19 7:51 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From matthew at linuxfromscratch dot org 2004-11-19 07:51 -------
Putting trivial test cases together, both with and without #pragma GCC
system_header in them, the compiler behaves correctly. Compiling the test case
in comment 1 shows results in 24 lines of warnings, none of which the user can
do anything about, as they all relate to the _internal_ headers in
/usr/include/c++/${gcc-version}/bits. So, system headers appear to be treated
correctly (e.g. <list> has the #pragma GCC system_header), but why are the
headers in bits/ not treated as system headers? Neither adding the pragma to
those headers, nor adding "-isystem /usr/include/c++/${gcc-version}/bits" to the
command line appeared to have any effect.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14172
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/14172] g++ should not emit effc++ warnings in system headers
2004-02-17 9:54 [Bug c++/14172] New: g++ should ignore warnings in STL headers tneumann at pi3 dot informatik dot uni-mannheim dot de
@ 2004-02-17 16:29 ` giovannibajo at libero dot it
2004-11-19 7:51 ` matthew at linuxfromscratch dot org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: giovannibajo at libero dot it @ 2004-02-17 16:29 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From giovannibajo at libero dot it 2004-02-17 16:29 -------
Useful? For the user? I don't see how. I'm inclined to accept this as an
enhancement request. It's a one liner for each -Weffc++ entry.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2004-02-17 16:29:20
date| |
Summary|g++ should ignore warnings |g++ should not emit effc++
|in STL headers |warnings in system headers
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14172
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2005-11-26 9:08 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-14172-6883@http.gcc.gnu.org/bugzilla/>
2005-11-26 9:08 ` [Bug c++/14172] g++ should not emit effc++ warnings in system headers gdr at gcc dot gnu dot org
2004-02-17 9:54 [Bug c++/14172] New: g++ should ignore warnings in STL headers tneumann at pi3 dot informatik dot uni-mannheim dot de
2004-02-17 16:29 ` [Bug c++/14172] g++ should not emit effc++ warnings in system headers giovannibajo at libero dot it
2004-11-19 7:51 ` matthew at linuxfromscratch dot org
2004-11-23 10:18 ` matthew at linuxfromscratch dot org
2005-02-22 10:28 ` pinskia 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).