🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #1049

extern

#1049
From: Mike Schilling(This sentence no ...
Date: Tue, 05 Dec 1989 17:13
18 lines
1066 bytes
If the variable referenced in an "extern" declaration is never used, is a
reference created?  For instance, if "foo.h" contains:

	int foo_func(int i, double d);
	extern int ifoo;

and I include it to get the prototype, but don't make any use of "ifoo",
(or define it in any other module) will I get a link error?

I know the answer under VMS, AOS, SunOS, etc, but don't know what ANSI 
mandates (if anything).
----------------------------------------------------------------------------
Any resemblance between the opinions expressed above and those of any living
person is a coincidence.
----------------------------------------------------------------------------
Mike Schilling 				mikes@rtech.com
Ingres Corporation
Alameda, CA
Technical Details
Message-ID: <4231@rtech.rtech.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!usc!ucsd!ames!amdahl!rtech!mikes@rtech.UUCP

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!usc!ucsd!ames!amdahl!rtech!mikes@rtech.UUCP
From: mikes@rtech.UUCP (Mike Schilling(This sentence no verb.))
Newsgroups: comp.std.c
Subject: extern
Message-ID: <4231@rtech.rtech.com>
Date: 5 Dec 89 17:13:54 GMT
Sender: news@rtech.rtech.com
Lines: 18