This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: compiling empty files fails


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]