On Wed, Jul 02, 2008 at 03:47:49PM +0200, Vincent Lefevre wrote: > On 2008-07-02 00:12:33 +0000, Joseph S. Myers wrote: > > This internal binary no longer exists. Instead, there is a "cpp" > > binary installed in the user binary directory, which calls the "cc1" > > binary to do the same preprocessing as it does when compiling; that > > is, it has the same effect as "gcc -E". > > Not exactly: > > vin% cpp -dM /dev/null | wc -l > 128 > vin% gcc -E -dM /dev/null | wc -l > gcc.real: /dev/null: linker input file unused because linking not done > 0 > > Is it a bug of "gcc -E"?
Not really, it just doesn't understand it needs to treat an empty file as C... instead you have to tell it so with -x c (wks9 ~)$ cpp -dM /dev/null | wc -l 86 (wks9 ~)$ gcc -E -dM /dev/null | wc -l gcc: /dev/null: linker input file unused because linking not done 0 (wks9 ~)$ gcc -E -x c -dM /dev/null | wc -l 86 (wks9 ~)$ gcc -E -x c++ -dM /dev/null | wc -l 92