🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #2669

linkage specifiers

#2669
From: daniel
Date: Wed, 03 Apr 1991 22:19
30 lines
1197 bytes
What does it mean for an extern linkage specifier
to refer to a non-file scope object?

For example:

	int foo = 2;

	int bar(int foo)
	{
		{
			extern int foo;

			return foo;
		}
	}

Paraphrased from 3.1.2.2: 
  ''If the declaration of an identifier ... contains "extern", the
	identifier has the same linkage as any visible declaration
	of the identifier with file scope.''

This sentence clearly does not apply, because the file-scope 
declaration is not visible; the parameter declaration hides it.

To what object does the extern declaration refer?
It appears to refer to the parameter declaration. 
Is this necessarily the case? Could it denote some
as-yet-unseen file-scope object having external linkage?

Daniel Edelson
Technical Details
Message-ID: <14094@darkstar.ucsc.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!cs.utexas.edu!uwm.edu!bionet!agate!darkstar!terra.ucsc.edu!daniel

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!cs.utexas.edu!uwm.edu!bionet!agate!darkstar!terra.ucsc.edu!daniel
From: daniel@terra.ucsc.edu
Newsgroups: comp.std.c
Subject: linkage specifiers
Message-ID: <14094@darkstar.ucsc.edu>
Date: 3 Apr 91 22:19:55 GMT
Sender: usenet@darkstar.ucsc.edu
Reply-To: daniel@terra.ucsc.edu ()
Organization: University of California, Santa Cruz
Lines: 30