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)


Richard Earnshaw wrote:
That's not relevant. We know the code is incorrect if you never inline. The question is whether the code is correct if you always inline.

I don't see any reason the compiler would change language semantics just because it ensures some certain things about code generation.

c99 doesn't have to worry about that situation; since there is no way of forcing inline behaviour in the standard then the code must be incorrect.

It doesn't have to worry about it, because it defines it to be non-conforming code.

If we want to allow mandatory inlining then we have to decide whether the example is legal or not. If we decide that it's legal, then we had better have a test to ensure we do it correctly.

While it might be possible to make longjmp() work with this example if always inlining, it would not be a good idea to tell the users they can rely on this working, imho.


Segher




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