public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/3871: -Winline misses warning
@ 2002-12-10 16:41 bangerth
0 siblings, 0 replies; 2+ messages in thread
From: bangerth @ 2002-12-10 16:41 UTC (permalink / raw)
To: gcc-bugs, gcc-prs, igusarov, nobody
Old Synopsis: Enabled warning message is not generated
New Synopsis: -Winline misses warning
State-Changed-From-To: open->analyzed
State-Changed-By: bangerth
State-Changed-When: Tue Dec 10 16:41:29 2002
State-Changed-Why:
While I believe that your original example is not very
good since the forward declarating a function as "inline"
does not make a difference, the following snippet indeed
has an example where foo() is not inlined and -Winline
does not give a message:
--------------------------
#include <setjmp.h>
inline void foo() {setjmp(0);};
int main(int, char**)
{
foo();
return 0;
};
-------------------------
This holds for all gcc versions I have. The assembler
output clearly shows that foo() is not inlined.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=3871
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: c++/3871: -Winline misses warning
@ 2003-04-29 7:51 steven
0 siblings, 0 replies; 2+ messages in thread
From: steven @ 2003-04-29 7:51 UTC (permalink / raw)
To: gcc-bugs, gcc-prs, igusarov, nobody
Synopsis: -Winline misses warning
State-Changed-From-To: analyzed->closed
State-Changed-By: steven
State-Changed-When: Tue Apr 29 07:51:38 2003
State-Changed-Why:
Fixed in GNU C++ version 3.4 20030429 (experimental)
Heck, I even get a warning for a system header function!
./cc1plus -quiet t.cc -O3 -Wall -Winline
t.cc: In function `int main(int, char**)':
t.cc:2: warning: inlining failed in call to `void foo()'
t.cc:5: warning: called from here
t.cc: In function `void foo()':
/usr/include/setjmp.h:52: warning: inlining failed in call to `int
_setjmp(__jmp_buf_tag*)'
t.cc:2: warning: called from here
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=3871
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-04-29 7:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-12-10 16:41 c++/3871: -Winline misses warning bangerth
2003-04-29 7:51 steven
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).