This is the mail archive of the 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]

Re: __inline__ keyword in 3.0+?

"Joseph S. Myers" wrote:
> On Mon, 8 Jan 2001, Tom Leete wrote:
> > What is planned for the '__inline__' keyword? Will it continue to use the
> > current gcc syntax, or will it remain a synonym of 'inline'? Will it be
> > deprecated?
> My expectation is that it will remain a synonym of inline - which will at
> some point, though not for GCC 3.0, change to use ISO C99 semantics
> instead of current GCC semantics.  (Existing headers using the old version
> of extern inline, e.g. glibc, will need to be fixincluded.  The Linux
> kernel has already been fixed to use static inline, and for compatibility
> between C99 and old GCC semantics you probably want to do the same in your
> code.)  Different semantics for 'inline' and '__inline__' would be a
> recipe for confusion.
> --
> Joseph S. Myers

I was hoping that wasn't the case.

Keeping gcc2.x behavior for '__inline__' while observing standard for
'inline' would allow compilation of mixed C99 and old gcc-specific sources.
Denying that forces disuse of C99 in many situations. The fixinclude could
then be as simple as a pipe through:

awk '/[[:space:]]inline[[:space:]]/ gsub(/[[:space:]]inline[[:space:]]/,"
__inline__ ")'

This model worked well for g++ -- except where use of __inline__ was

Thanks for your reply,

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