Re: extern
- From: "Netocrat" <netocrat@xxxxxxxxxxx>
- Date: 25 Jul 2005 06:12:08 -0700
Richard Bos wrote:
> "Netocrat" <netocrat@xxxxxxxxxxx> wrote:
> > On Mon, 25 Jul 2005 09:36:04 +0100, Flash Gordon wrote:
> > > Old Wolf wrote:
<snip>
>> 6.2.2p4 fully defines the meaning of the extern keyword, and that is as
>> an external linkage declarator. An exception is made that where a
>> variable was previously declared with the static keyword, a later
>> declaration with the extern keyword does not reverse the original
>> internal linkage of the object, but clearly the general case is that
>> extern == external linkage.
>
> No, it isn't. Declared extern usually implies external linkage, but not
> v.v. Most objects and functions with external linkage are not declared
> extern.
"==" was the wrong thing to write, and not what I intended. Instead
substitute "means".
> > >> So you are using "an extern" to mean "something declared with the
> > >> keyword 'extern'". I (and Mark McIntyre, apparently), use "an extern"
> > >> to mean "something with external linkage".
> >
> > Which is exactly what it seems to be defined to be.
>
> Which of the two? With external linkage, or _explicitly_ declared with
> external linkage? There's the whole point of this sub-thread, I think.
Right, again unclearly worded. I meant that "an extern" is defined as
"something with external linkage" (with the noted exception) but did
not intend to imply the reverse.
6.2.2 also specifies that for a function-scope variable declaration,
linkage is external regardless of whether the extern keyword is used or
ommitted (so long as static is not used).
.
- Follow-Ups:
- Re: extern
- From: Netocrat
- Re: extern
- References:
- extern
- From: DevarajA
- Re: extern
- From: Mark McIntyre
- Re: extern
- From: Flash Gordon
- Re: extern
- From: Old Wolf
- Re: extern
- From: Flash Gordon
- Re: extern
- From: Old Wolf
- Re: extern
- From: Flash Gordon
- Re: extern
- From: Netocrat
- Re: extern
- From: Richard Bos
- extern
- Prev by Date: Re: gcc: pointer to array
- Next by Date: Re: extern
- Previous by thread: Re: extern
- Next by thread: Re: extern
- Index(es):
Relevant Pages
|