Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!dali.cs.montana.edu!uakari.primate.wisc.edu!sdd.hp.com!wuarchive!uunet!cimshop!davidm From: cimshop!davidm@uunet.UU.NET (David S. Masterson) Newsgroups: comp.sys.amiga.programmer Subject: Re: Is this valid C? Message-ID: Date: 6 May 91 18:01:39 GMT References: <1991May5.222328.16225@csis.dit.csiro.au> Sender: davidm@cimshop.UUCP Organization: Consilium Inc., Mountain View, California Lines: 30 In-reply-to: dave@csis.dit.csiro.au's message of 5 May 91 22:23:28 GMT >>>>> On 5 May 91 22:23:28 GMT, dave@csis.dit.csiro.au (David Campbell) said: David> Its just that this will compile on my favourite Unix compiler but won't David> on Lattice V5.10. David> /*----------------------------------------------------------------*/ David> extern struct thing t; David> struct thing { David> int n; David> char *s; David> }; David> main() David> { David> t.n = 10; David> t.s = "hello"; David> } David> /*-----------------------------------------------------------------*/ Is there another file that has the definition of 't' in it? If not, then this shouldn't link (but it should compile) as there is no allocation of space for 't'. -- ==================================================================== David Masterson Consilium, Inc. (415) 691-6311 640 Clyde Ct. uunet!cimshop!davidm Mtn. View, CA 94043 ==================================================================== "If someone thinks they know what I said, then I didn't say it!"