This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: cpp doesn't define symbol i386
- To: Jim Wilson <wilson at cygnus dot com>
- Subject: Re: cpp doesn't define symbol i386
- From: Ronald dot Wahl at informatik dot tu-chemnitz dot de
- Date: Tue, 14 Oct 1997 10:23:02 +0200 (CEST)
- cc: law at cygnus dot com, egcs at cygnus dot com
On Tue, 14 Oct 1997 Ronald.Wahl@Informatik.TU-Chemnitz.DE wrote:
> On Mon, 13 Oct 1997, Jim Wilson wrote:
>
> > As far as I can tell i386 should still be defined. Can you investigate
> > why it's not being defined?
> >
> > i386 is defined only if you use `gcc -E'. This person is complaining that
> > it is not defined if you use `cpp'. I think the answer here is to tell people
> > that they can't rely on using `cpp' for preprocessing stuff that isn't C code,
> > but if they really want to use it, then they should use `gcc -E' (or maybe
> > even `gcc -E -traditional') instead of just `cpp'.
>
> Hmm, now I replaced /lib/cpp by a script which calls "gcc -E $*". After a
> bit of thinking I must say that this is a cleaner solution than linking to
> the real cpp. Now I do not need to update this link anymore after
> upgrading gcc.
It's not as easy as I thought...
"gcc -E" is not equivalent to cpp because cpp read from stdin by default
and "gcc -E" needs the parameter "-" to force reading from stdin. But
hardcoding "-" in a shellscript will not be a solution due to cases where
cpp is called with an inputfile. Is it possible to change the behavior of
"gcc -E" so that it reads from stdin by default?
ron
--
\ Ronald Wahl --- rwa@informatik.tu-chemnitz.de \
\ WWW: http://www.tu-chemnitz.de/~row \
\ Talk: rwa@goliath.csn.tu-chemnitz.de \
\ PGP key available by finger to my email address \