This is the mail archive of the
mailing list for the GCC project.
Re: organization of C Extensions in manual
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Jeff Law <law at redhat dot com>
- Cc: Sandra Loosemore <sandra at codesourcery dot com>, David Wohlferd <dw at LimeGreenSocks dot com>, "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>, "joel dot sherrill at oarcorp dot com >> Joel Sherrill" <joel dot sherrill at oarcorp dot com>, "gary at intrepid dot com >> Gary Funck" <gary at intrepid dot com>, Gerald Pfeifer <gerald at pfeifer dot com>
- Date: Thu, 22 Jan 2015 21:23:50 +0000
- Subject: Re: organization of C Extensions in manual
- Authentication-results: sourceware.org; auth=none
- References: <54BAF3EE dot 70308 at LimeGreenSocks dot com> <54BBE38F dot 6030007 at codesourcery dot com> <54C13B3F dot 7010603 at redhat dot com>
On Thu, 22 Jan 2015, Jeff Law wrote:
> > > Inline: Defining inline functions (as fast as macros).
> > Doesn't seem to belong here.
> Given that inline isn't really an extension anymore, one could argue this
> isn't relevant anymore.
Well, we need to document -std=gnu89 / __gnu_inline__ attribute semantics.
And the fact that a C99 feature is accepted as an extension in C89 mode is
something that needs documenting. Though for C extensions maybe the
documentation would better describe exceptions - extensions from newer C
standards that are *not* enabled in older standard modes, or that are only
enabled when you use alternative keywords such as __inline. Then you
wouldn't need to go into the details e.g. of long long, just that it's an
extension accepted in C89 / C++98 mode.
(For C++ there may be more features than for C that require -std=c++11 to
enable them, so listing exceptions may not be the right approach for C++.)
Ways in which GNU C features go beyond the corresponding standard feature
do also need documenting. (So VLA documentation needs to refer to VLAs in
structures, and to the interaction with alloca, and to parameter forward
declarations, even if the basic feature is described in terms of a C99
feature also supported in C89 mode and for C++ and there's less need to
describe the C99 semantics.)
Joseph S. Myers