public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "hozelda at yahoo dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/11377] fault or warn modifiable static in extern inline definition
Date: Sat, 07 Aug 2004 00:18:00 -0000	[thread overview]
Message-ID: <20040807001816.22822.qmail@sourceware.org> (raw)
In-Reply-To: <20030630102552.11377.algrant@myrealbox.com>


------- Additional Comments From hozelda at yahoo dot com  2004-08-07 00:18 -------
 
[6.7.4#3] An inline definition of a function with external 
 linkage shall not contain a definition of a modifiable 
 object with static storage duration, and shall not contain a 
 reference to an identifier with internal linkage. 
 
The following is an excerpt from bug report 16622: 
 
** 
File 5 
//the following 3 function definitions would all violate 6.7.4#3 
// inline void f1_bad() {static a;}  //violates part a 
static x1; 
// inline void f2_bad() {extern x1;}  //violates part b 
// inline void f3_bad() {x1 = 0;}  //violates part b 
//but the following are OK 
extern inline void f() {static a; extern x1; x1=0;}  //not inline def 
static inline void g() {static a; extern x1; x1=0;}  //not external linkage 
static [void] h(void); 
static inline [void] h() {static a; extern x1; x1=0;}  //neither i.d. nor e.l. 
** 
 
//comment: [void] is where 'void' should have gone in original 16622#4 message but didn't (a typo/omission). 
There are other 'void' accidently missing from earlier parts of the original (not shown in above quote). 
 
[The 'g' example under section 2 (and also the last paragraph under section 2) may be of interest here, but I 
won't quote it.] 
 
 
 

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11377


  parent reply	other threads:[~2004-08-07  0:18 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-30 10:25 [Bug c/11377] New: " algrant at myrealbox dot com
2003-07-18 22:52 ` [Bug c/11377] " dhazeghi at yahoo dot com
2003-08-23  0:36 ` dhazeghi at yahoo dot com
2003-11-27 16:46 ` pinskia at gcc dot gnu dot org
2004-08-07  0:18 ` hozelda at yahoo dot com [this message]
2004-08-11 21:05 ` jsm28 at gcc dot gnu dot org
     [not found] <bug-11377-1536@http.gcc.gnu.org/bugzilla/>
2006-05-04 21:49 ` geoffk at gcc dot gnu dot org
2006-10-16 21:53 ` geoffk at gcc dot gnu dot org
2006-11-01  4:47 ` geoffk at gcc dot gnu dot org
2006-11-01  4:48 ` geoffk at gcc dot gnu dot org
2006-11-01  5:40 ` geoffk at gcc dot gnu dot org
2006-11-30 19:26 ` chaoyingfu at gcc dot gnu dot org

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=20040807001816.22822.qmail@sourceware.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@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: link
Be 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).