Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!uunet!ncrlnk!ncr-sd!hp-sdd!hplabs!hpda!hpcuhb!hpcllla!hpclisp!hpclscu!shankar From: shankar@hpclscu.HP.COM (Shankar Unni) Newsgroups: comp.lang.c Subject: Re: C linkage query Message-ID: <660038@hpclscu.HP.COM> Date: 13 Jun 89 19:55:35 GMT References: <9449@alice.UUCP> Organization: Hewlett-Packard Calif. Language Lab Lines: 16 > > >I.e., if you compile a file containing > > > extern int foo; > > > main() {} > > >and link that *with no other object files and with no libraries that > > >define "foo"*, will the link fail? > I have since learned that this is explicitly legal in ANSI C. True. Section 3.7.1, footnote 75 in the Dec 88 draft. From the Dec 88 dpANS: 75. Thus, if an identifier declared with external linkage is not used in an expression, there need be no external definition for it. --- Shankar.