storage class != Storage Class (Was: Why are typedef names ...)

karl at haddock.UUCP karl at haddock.UUCP
Sat Dec 13 09:01:20 AEST 1986


In article <3745 at utcsri.UUCP> greg at utcsri.UUCP (Gregory Smith) writes:
>So there are three 'storage classes' (really link-time scope classes)
>for top-level objects:
>
>(1) static: object is defined here in this file and is not externally visible.
>(2) <none>: object is defined here in this file and *is* externally visible.
>(3) extern: object is not defined here but is available externally.

Which brings up an interesting question:  How do you declare an object which
is not being defined at this point and is not available externally?  Is there
a portable way to make a forward declaration of a static variable?  (I've been
using "extern", but I wonder if that really works on all compilers.)

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