This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: compiling empty files fails
- To: Ulrich Drepper <drepper at cygnus dot com>
- Subject: Re: compiling empty files fails
- From: Michael Meissner <meissner at cygnus dot com>
- Date: Wed, 13 Sep 2000 01:10:47 -0400
- 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>
On Tue, Sep 12, 2000 at 09:24:04PM -0700, Ulrich Drepper wrote:
> Various packages (among them glibc) assumes that compiling an empty
> file simply produces an object file with no definitions. The current
> gcc returns an error. In fact, it is the preprocessor which fails.
>
> To reproduce:
>
> echo > foo.c
> gcc -c foo.c
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.
--
Michael Meissner, Red Hat, Inc.
PMB 198, 174 Littleton Road #3, Westford, Massachusetts 01886, USA
Work: meissner@redhat.com phone: +1 978-486-9304
Non-work: meissner@spectacle-pond.org fax: +1 978-692-4482