🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #898

Re: Why can't you define an external object twice and never use it?

#898
From: Paul Eggert
Date: Tue, 14 Nov 1989 02:11
11 lines
982 bytes
I asked what was wrong with the external definitions `int X = 0; int X = 0;'
if X is used nowhere else.  Doug Gwyn replied:

	I don't know why you cite constraints on multiple definition;
	the real problem is that you have violated the "only one
	initialization" constraint.

Where is this constraint written down?  It's not in either pANS 3.5.7
("Initialization") or pANS 3.7 ("External definitions"), where I would
have expected it.  I fear it was so obvious that it wasn't written
down anywhere.
Technical Details
Message-ID: <54@looney.twinsun.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!usc!ucla-cs!twinsun!eggert
References: <53@looney.twinsun.com> <11582@smoke.BRL.MIL>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!usc!ucla-cs!twinsun!eggert
From: eggert@twinsun.com (Paul Eggert)
Newsgroups: comp.std.c
Subject: Re: Why can't you define an external object twice and never use it?
Message-ID: <54@looney.twinsun.com>
Date: 14 Nov 89 02:11:05 GMT
References: <53@looney.twinsun.com> <11582@smoke.BRL.MIL>
Sender: news@twinsun.com
Reply-To: eggert@twinsun.com (Paul Eggert)
Organization: Twin Sun, Inc
Lines: 11