🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #844

Re: Empty source file

#844
From: David Wolverton
Date: Wed, 25 Oct 1989 00:07
23 lines
1324 bytes
This discussion (and, apparently, the ANSI committee members) seem
to be confusing the LANGUAGE with its IMPLEMENTATION.

Suppose the ANSI (draft) standard allowed empty translation
units.  It is still very easy to implement a compiler for this
near-ANSI C on a machine whose linker requires "some symbol,
any old symbol" in each and every translation unit.

One must simply ensure that the compiler, if it notices that
no symbols have been emitted, emits the equivalent of
	"static int __my_dummy_symbol;"
for each and every translation unit.  If, as Doug(?) suggested,
a linker might even require that the symbol have external
linkage, then it would take a little more work to manufacture
a suitable non-conflicting symbol name.

But the point is, the implementation can be responsible
for this issue, the language definition doesn't need to
be a watchdog here.

Dave Wolverton
daw@attunix.att.com
Technical Details
Message-ID: <5035@cbnewsh.ATT.COM>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!att!cbnewsh!daw
References: <10955@riks.csl.sony.co.jp> <9802@chinet.chi.il.us> <1891@uwbull.uwbln.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!att!cbnewsh!daw
From: daw@cbnewsh.ATT.COM (David Wolverton)
Newsgroups: comp.std.c
Subject: Re: Empty source file
Message-ID: <5035@cbnewsh.ATT.COM>
Date: 25 Oct 89 00:07:31 GMT
References: <10955@riks.csl.sony.co.jp> <9802@chinet.chi.il.us> <1891@uwbull.uwbln.UUCP>
Distribution: comp
Organization: AT&T Bell Labs, Holmdel, NJ
Lines: 23