This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/3871: -Winline misses warning
- From: bangerth at dealii dot org
- To: gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, igusarov at akella dot com, nobody at gcc dot gnu dot org
- Date: 11 Dec 2002 00:41:29 -0000
- Subject: Re: c++/3871: -Winline misses warning
- Reply-to: bangerth at dealii dot org, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, igusarov at akella dot com, nobody at gcc dot gnu dot org, gcc-gnats at gcc dot gnu dot org
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