Preprocessor woes
Mark Kettenis
kettenis@wins.uva.nl
Fri Jan 5 15:39:00 GMT 2001
From: "Zack Weinberg" <zackw@stanford.edu>
Date: Fri, 5 Jan 2001 14:40:26 -0800
On Fri, Jan 05, 2001 at 09:45:55PM +0000, Neil Booth wrote:
> Mark Kettenis wrote:-
>
> > occur. Since the SHLIB_COMPAT macro uses the ISO C ## concatenation
> > operator, -traditional messes things up. Is there any chance at
> > convincing the GCC folks to provide a preprocessor that's backwards
> > compatible with cccp?
>
> Try using the portable CONCAT macros that GCC does. That's much
> simpler than rewriting tradcpp (which is what this would require).
Concatenation with ## has never worked in -traditional mode. The real
problem is something else.
We used to preprocess this stuff without -traditional. Then the new
preprocessor introduced some whitespace in funny places; see
< http://sources.redhat.com/ml/libc-alpha/2000-11/msg00262.html >. Then
Ulrich switched to -traditional (I think after a suggestion from you
or Neil). And now the Hurd doesn't build anymore :-(.
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.
Mark
More information about the Gcc
mailing list