POV-Ray : Newsgroups : povray.off-topic : You thought 4K graphics demos were impressive? : Re: You thought 4K graphics demos were impressive? Server Time
5 Sep 2024 13:13:24 EDT (-0400)
  Re: You thought 4K graphics demos were impressive?  
From: Fredrik Eriksson
Date: 29 Aug 2009 14:45:06
Message: <op.uzfs1fla7bxctx@e6600>
On Sat, 29 Aug 2009 20:20:56 +0200, Warp <war### [at] tagpovrayorg> wrote:
> Darren New <dne### [at] sanrrcom> wrote:
>> Hence my clarification. It's obviously a valid .h file. But is it a  
>> valid .c file?
>
>   According to gcc, no (although it does compile it nevertheless):
>
> > touch test.c
> > ls -l
>  total 0
>  -rw-r--r-- 1 warp users 0 2009-08-29 21:18 test.c
> > gcc -pedantic -c test.c
>  test.c:1: warning: ISO C forbids an empty source file
>  warp@a8:~/tmp/hops>ls -l
>  total 4
>  -rw-r--r-- 1 warp users   0 2009-08-29 21:18 test.c
>  -rw-r--r-- 1 warp users 684 2009-08-29 21:18 test.o

Not everyone thinks that GCC is right about this. The only relevant part I  
can find in the actual standard is "A source file that is not empty shall  
end in a new-line character" (5.1.1.2.2), which seems to imply that empty  
source files are OK.



-- 
FE


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.