Still having major problems with cpplib and imake

Neil Booth NeilB@earthling.net
Fri May 12 02:50:00 GMT 2000


Jakub Jelinek wrote:-

> Yes, I wanted to say initial tab is the only problematic case with
> -traditional I saw at the moment (once that is fixed, I can try once again
> and throw the generated Makefiles to make and try to compile X to see if
> other things aren't broken as well).

Great.

> Look below, X11 contains a lot of B-style macros, while it should use 
> C-style macros to work with both K&R and ANSI. X expects lib.a, space in
> between is for obvious reason wrong (it is a filename).

OK.  The problem is not whitespace in this example - no whitespace
would be introduced regardless of -traditional setting.

The problem is tokenisation.  I hope my other mail made it clear - the
preprocessor would see separate tokens (and hence using the macro in a
#include would not work under -traditional) but the front-end would
see the filename as a single token.  Is this OK?

Neil.

> #if (__STDC__ && !defined(UnixCpp)) || defined(AnsiCpp)
> #define Concat(a,b)a##b
> #else
> #define Concat(a,b)a/**/b
> #endif
> #define A(x) x
> #define B(y) A(y.a)
> #define C(y) A(Concat(y,.a))
> B(lib)
> C(lib)



More information about the Gcc-bugs mailing list