Lattice/UNIX incompatibility

Henry Spencer henry at utzoo.UUCP
Sat Dec 29 08:45:57 AEST 1984

> Every version of the Lattice compiler I have seen has four
> non-standard things:
> ...
> 	3. Every declaration of an external variable but
> 	   one must say 'extern'.
> 	4. Case is ignored in external variables.

These two are actually legitimate C.  In fact, if you look carefully
at K&R, it would appear to *require* #3, although in fact many of the
real implementations are looser.  (This is about the way the ANSI C
people are treating it, too.)  #3 is often necessary in non-Unix systems
because the linker insists that an occurrence of an external variable
is either (a) a reference to something declared elsewhere, or (b) a
(unique) declaration, and you *must* specify which.  So you cannot just
treat all occurrences as equivalent, the way the Unix setup does; one
of them (or all but one of them) must be specially marked.

#4 is likewise a legitimate variation when coping with stupid linkers.

Whether either of these is actually *necessary* in the environment the
Lattice compiler is running in, I can't say.
				Henry Spencer @ U of Toronto Zoology

More information about the Comp.lang.c mailing list