extern

Mike SchillingThis sentence no verb. mikes at rtech.UUCP
Wed Dec 6 04:13:54 AEST 1989


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 at rtech.com
Ingres Corporation
Alameda, CA



More information about the Comp.std.c mailing list