Preprocessor woes
Joe Buck
jbuck@racerx.synopsys.com
Fri Jan 5 16:56:00 GMT 2001
> I cc'd you GCC folks to make you aware that the new preprocessor is
> causing some real pain, and I saw no way out. Fortunately there are
> at least two workarounds (thanks Neil and Jakub). I still think it
> would be better if the new integrated preprocessor would be backwards
> compatible with the old one, even for sources that are not C.
The integrated preprocessor is intended for use only with C, C++ or
Objective-C, because in its normal mode the lexing for the preprocessor
and the compiler are combined. There are no longer two separate programs
communicating with each other via file or pipe. (If you ask for the
output, you do get text, but it is somewhat artificial in that the
compiler never normally reads this text).
I've supported efforts to keep -traditional traditional (that is, suitable
for all the non-C uses it's currently being put to), including beating
Zack up perhaps a bit too strongly when he objected. But I'll only take
that battle so far. If you want to process text that is not C (or C++ or
Objective-C), use -traditional; without -traditional there is no promise
of consistent behavior for input that is not ISO C. Demanding complete
consistency on non-standard input is an impossibly difficult task for a
completely new implementation.
We'll be happy to help people who are having problems with this fix their
software or come up with other workarounds.
More information about the Gcc
mailing list