question about scope & linkage

Karl Heuer karl at haddock.ima.isc.com
Sat Aug 12 04:42:25 AEST 1989


In article <1001 at virtech.UUCP> cpcahil at 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 at haddock.isc.com), The Walking Lint



More information about the Comp.lang.c mailing list