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)


At 18.56 13/03/2003 -0800, Dale Johannesen wrote:
Those of you who think inlining is guaranteed to be semantically neutral
might consider this....

#include <setjmp.h>
static jmp_buf buf;
inline void x() { setjmp(buf); }
main() { x(); longjmp(buf); }

Question.


Is the following legal C code ?
It also has different scopes for setjmp() and longjmp(), and it's what I'd expect from inlining the above example.


#include <setjmp.h>
static jmp_buf buf;

int main (void) {
  {
    setjmp(buf);
  }
  longjmp(buf);
}



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