Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!gem.mps.ohio-state.edu!uakari.primate.wisc.edu!aplcen!haven!adm!smoke!gwyn From: gwyn@smoke.BRL.MIL (Doug Gwyn) Newsgroups: comp.std.c Subject: Re: Empty source file Message-ID: <11302@smoke.BRL.MIL> Date: 16 Oct 89 04:54:06 GMT References: <10955@riks.csl.sony.co.jp> <9802@chinet.chi.il.us> Reply-To: gwyn@brl.arpa (Doug Gwyn) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 19 In article <9802@chinet.chi.il.us> kdb@chinet.chi.il.us (Karl Botts) writes: >Are you sure this is true; I find it hard to believe. It is quite >reasonable and not uncommon to have source files which are empty after the >preoprocessor gets done with them. I have had such in the past, and have >explicitly tested it on xeveral compilers, and empty source files do >compile to do-nothing objects, which seems right to me. Unfortunately, many linkers do not accept contentless object modules. If you say that's a stupid way to design linkers, I would agree, but it doesn't change the fact that such linkers exist. Therefore the "universal" definition for the language must require of a strictly conforming (i.e., maximally portable) program that it contain SOMEthing. Actually, I think this should have been: SOMEthing with EXTERNAL LINKAGE, since about as many linkers have problems with that as with empty objects. The proposed Standard does not seem to specify this the way I thought we intended; it seems to permit a translation unit to have just an object declaration with internal linkage, so long as the object is not used in an expression.