This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: -fobey-inline (was Re: gcc and inlining)
- From: Alexandre Oliva <aoliva at redhat dot com>
- To: Dale Johannesen <dalej at apple dot com>
- Cc: dewar at gnat dot com (Robert Dewar), echristo at redhat dot com, Richard dot Earnshaw at arm dot com, aph at redhat dot com, gcc at gcc dot gnu dot org
- Date: 16 Mar 2003 15:31:33 -0300
- Subject: Re: -fobey-inline (was Re: gcc and inlining)
- Organization: GCC Team, Red Hat
- References: <9BA5B65A-55C8-11D7-B9FE-000393D76DAA@apple.com>
On Mar 13, 2003, Dale Johannesen <dalej at apple dot com> wrote:
> Those of you who think inlining is guaranteed to be semantically neutral
> might consider this....
This invokes undefined behavior. Which means there's no law against
making it work against all odds, and inlining is a means to accomplish
that. OTOH, there's no requirement that it actually does something
useful. I.e., inlining is sematically-neutral in this regard.
> #include <setjmp.h>
> static jmp_buf buf;
> inline void x() { setjmp(buf); }
> main() { x(); longjmp(buf); }
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva at {redhat dot com, gcc.gnu.org}
CS PhD student at IC-Unicamp oliva at {lsd dot ic dot unicamp dot br, gnu.org}
Free Software Evangelist Professional serial bug killer