This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: -fobey-inline (was Re: gcc and inlining)


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]