Path: 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 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