This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug preprocessor/51391] pragma GCC diag ignored then warning of Winline activates -fno-inline
- From: "pnewell at cs dot cmu.edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 03 Dec 2011 03:29:03 +0000
- Subject: [Bug preprocessor/51391] pragma GCC diag ignored then warning of Winline activates -fno-inline
- Auto-submitted: auto-generated
- References: <bug-51391-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51391
--- Comment #9 from pnewell at cs dot cmu.edu 2011-12-03 03:29:03 UTC ---
I just tested on my Linux box and I am getting the results you suggest for -O2
and -O3. It is finding issues with -O, -Os, and -O1, but I think that is my
problem (barking on the inlined destructor).
However, -O0 still gives me the -fno-inline warnings
I just got your email about "Because there is code to explicitly turn off the
warning for -O0 but not when using the pragma". I've never seen any
documentation about the pragma GCC diagnostic warning having different actions
than just on the compile line. Is there any more info on this?
Please pardon my questioning this, but does that seem right? I would expect
same behavior between a compile line -Winline and a pragma in the code stating
"#pragma GCC diagnostic warning "-Winline"?
Thanks,
Paul