This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: compiling empty files fails
- To: Michael Meissner <meissner at cygnus dot com>
- Subject: Re: compiling empty files fails
- From: Ulrich Drepper <drepper at redhat dot com>
- Date: 12 Sep 2000 23:33:29 -0700
- Cc: gcc-bugs at gcc dot gnu dot org, Zack Weinberg <zack at blastula dot phys dot columbia dot edu>
- References: <m3aedchqcb.fsf@otr.mynet.cygnus.com><20000913011047.64218@cse.cygnus.com>
- Reply-To: drepper at cygnus dot com (Ulrich Drepper)
Michael Meissner <meissner@cygnus.com> writes:
> I remember it being in the 1989 C standard that each translation
> unit must have at least one token. I couldn't find it via a quick
> scan of the 1999 draft I have stored locally.
C99 mentions in 5.1.1.2 item 3.
[...] A source file that is not empty shall end...
This could be read as "empty source files are valid".
But even without this argumentation, this was the previous behavior
and it is useful. If you create input files you can conditionally
create them with some input or empty. The compiler will in any case
do the right thing.
--
---------------. ,-. 1325 Chesapeake Terrace
Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA
Red Hat `--' drepper at redhat.com `------------------------