Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!rpi!uupsi!sunic!dkuug!diku!thorinn From: thorinn@diku.dk (Lars Henrik Mathiesen) Newsgroups: comp.std.c Subject: Re: 3.7.2 External Object Definitions Keywords: external,linkage,declaration,definition Message-ID: <1991Feb8.233209.16479@odin.diku.dk> Date: 8 Feb 91 23:32:09 GMT References: <131@tdatirv.UUCP> Sender: news@odin.diku.dk (Netnews System) Organization: Department of Computer Science, U of Copenhagen Lines: 12 sarima@tdatirv.UUCP (Stanley Friesen) writes: >In article eyal@echo.canberra.edu.au (Eyal Lebedinsky) writes: >>I tried gnu (1.39) which I hope is ANSI by now. It likes this one: >> >>(1) extern int i7; >>(2) static int i7 = 1; >Well, then it is wrong. (1) is a tentative definition with *external* linkage. Actually, (1) is _not_ a definition, just a declaration. If (2) wasn't there, i7 would be reference to a definition in another file. (1) still makes the linkage external since (2) isn't visible at that point.