public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: "Joseph S. Myers" <jsm28@cam.ac.uk> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, Subject: Re: c/10488: Implementation of extern inline is exactly backwards Date: Fri, 25 Apr 2003 08:46:00 -0000 [thread overview] Message-ID: <20030425084601.7922.qmail@sources.redhat.com> (raw) The following reply was made to PR c/10488; it has been noted by GNATS. From: "Joseph S. Myers" <jsm28@cam.ac.uk> To: David.Moore@intel.com Cc: gcc-gnats@gcc.gnu.org, gcc-bugs@gcc.gnu.org Subject: Re: c/10488: Implementation of extern inline is exactly backwards Date: Fri, 25 Apr 2003 09:36:13 +0100 (BST) On Fri, 25 Apr 2003 David.Moore@intel.com wrote: > When extern inline is used on a function definition, a body for that > function must be layed down in the current compilation unit binary. When > just inline is given, no body should be layed down. We are aware of this. See c99status.html. The intention is that for compatibility the existing semantics will remain in gnu89 mode and the C99 semantics will be provided in c99/gnu99 modes. Patches to implement the C99 semantics (including the necessary fixincludes work to fix the many different versions of installed glibc headers that expect the old semantics, and including thorough testcases) are welcome; I am not aware of anyone working on this. > 6.7.4 says that if all the declarations of a function are "inline" (not > "extern inline") the compilation unit does not provide an external > definition for the function. That is, the body is not layed down. > Otherwise, if the extern storage class specifier is used, a body must be > layed down as per section 6.9. And note this means it is not as simple as: > Fix is probably simply a matter of flipping a condition but beware that > there are uses of this in the gnu C header files where the usage is > believed to also be backwards. (apart from the need to condition on flag_isoc99) because, for example, a function can be defined inline (without extern) and a subsequent declaration (as extern or without inline) then means an external definition must be provided. -- Joseph S. Myers jsm28@cam.ac.uk
next reply other threads:[~2003-04-25 8:46 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2003-04-25 8:46 Joseph S. Myers [this message] -- strict thread matches above, loose matches on Subject: below -- 2003-04-25 0:57 bangerth 2003-04-25 0:46 Andrew Pinski 2003-04-25 0:36 David.Moore
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20030425084601.7922.qmail@sources.redhat.com \ --to=jsm28@cam.ac.uk \ --cc=gcc-prs@gcc.gnu.org \ --cc=nobody@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).