🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #2385

Re: 3.7.2 External Object Definitions

#2385
From: Lars Henrik Mathiesen
Date: Fri, 08 Feb 1991 23:32
12 lines
1107 bytes
sarima@tdatirv.UUCP (Stanley Friesen) writes:
>In article <eyal.665840220@echo> 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.
Technical Details
Message-ID: <1991Feb8.233209.16479@odin.diku.dk>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!rpi!uupsi!sunic!dkuug!diku!thorinn
References: <eyal.665840220@echo> <131@tdatirv.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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: <eyal.665840220@echo> <131@tdatirv.UUCP>
Sender: news@odin.diku.dk (Netnews System)
Organization: Department of Computer Science, U of Copenhagen
Lines: 12