🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.bug
Article #1901

bug (of feature ?) in "gcc -E"

#1901
From: W. Wilson Ho
Date: Mon, 31 Oct 1988 20:05
40 lines
1683 bytes
When a "-E" flag is set to gcc, the following error message is given:

+------------
|how@iris:54> gcc -v -E foo.c
|gcc version 1.30
| /usr/local/lib/gcc-cpp -v -undef -D__GNU__ -D__GNUC__ -Dvax -Dunix foo.c
|GNU CPP version 1.30
|cpp: Is a directory for `'
+------------

where foo.c is ANY c program, event for empty file.

However, if the "-o" flag is given:

+------------
|how@iris:56> gcc -v -E foo.c -o foo.e
|gcc version 1.30
| /usr/local/lib/gcc-cpp -v -undef -D__GNU__ -D__GNUC__ -Dvax -Dunix foo.c -o foo.e
|GNU CPP version 1.30
+------------

everythings work fine.


The problem is probably that cpp always expects an output file name.
I couldn't find in the manual that we have to specify the output file
name when we want to run the preprocessor only.  Is this a bug or a
feature?

The gcc version I use is 1.30, running ultrix 2.2 on a vax 8600.

Wilson Ho
-------------------------------------------------------------------------------
  W. Wilson Ho		        |  INTERNET: how@iris.ucdavis.edu
  Division of Computer Science	|  UUCP:     {lll-crg, ucbvax}!ucdavis!iris!how
  EECS Department		|
  University of California	|  Phone:    (916)752-7109
  Davis, CA 95616		|
-------------------------------------------------------------------------------
Technical Details
Message-ID: <8810312005.AA24481@iris.ucdavis.edu>
Path: arc1-ca.pugleaf.net!utzoo!telly!ddsw1!mcdchg!rutgers!tut.cis.ohio-state.edu!IRIS.UCDAVIS.EDU!how

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!telly!ddsw1!mcdchg!rutgers!tut.cis.ohio-state.edu!IRIS.UCDAVIS.EDU!how
From: how@IRIS.UCDAVIS.EDU (W. Wilson Ho)
Newsgroups: gnu.gcc.bug
Subject: bug (of feature ?) in "gcc -E"
Message-ID: <8810312005.AA24481@iris.ucdavis.edu>
Date: 31 Oct 88 20:05:13 GMT
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 40