Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!ncar!ico!ism780c!haddock!karl From: karl@haddock.ima.isc.com (Karl Heuer) Newsgroups: comp.lang.c Subject: Re: question about scope & linkage Keywords: scope, linkage Message-ID: <14270@haddock.ima.isc.com> Date: 11 Aug 89 18:42:25 GMT References: <57257@tut.cis.ohio-state.edu> <1001@virtech.UUCP> Reply-To: karl@haddock.ima.isc.com (Karl Heuer) Distribution: na Organization: Interactive Systems, Boston Lines: 16 In article <1001@virtech.UUCP> cpcahil@virtech.UUCP (Conor P. Cahill) writes: >[Stuff about real vs. tentative definitions] A global symbol may have >unlimited tentative definitions, but only 1 real definition. I think you're confusing tentative definitions with non-defining declarations. >In other words, you can have "int i;" in every .c and they will all refer to >the same data space. This is not correct. A tentative definition retroactively becomes a real definition if the end of the source file is reached without seeing a real definition. The purpose of the tentative-definition nonsense is not to force the Common-block storage model to work; it's to allow forward reference to non-global identifiers. Karl W. Z. Heuer (ima!haddock!karl or karl@haddock.isc.com), The Walking Lint