cpp doesn't define symbol i386
Jim Wilson
wilson@cygnus.com
Tue Oct 14 11:01:00 GMT 1997
Is it possible to change the behavior of
"gcc -E" so that it reads from stdin by default?
I'd rather not. The behaviour of gcc -E is well established.
"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.
Perhaps you can write a shell script that checks for an input file and passes
the extra "-" if there isn't one?
Or maybe what we really need is a /lib/cpp drop in replacement program so
that people will stop trying to use gcc's cpp program for this purpose.
It shouldn't be too hard, we could just call gcc with a few options,
-E, -traditional, and maybe even a -x option, along with the '-' option if
there is no input file.
Jim
More information about the Gcc
mailing list