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: Segher Boessenkool <segher at koffie dot nl>
- To: Richard dot Earnshaw at arm dot com
- Cc: Robert Dewar <dewar at gnat dot com>, aph at redhat dot com, dalej at apple dot com,echristo at redhat dot com, gcc at gcc dot gnu dot org
- Date: Sat, 15 Mar 2003 07:48:55 +0100
- Subject: Re: -fobey-inline (was Re: gcc and inlining)
- References: <200303141724.h2EHOh523116@pc960.cambridge.arm.com>
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