This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Help wanted: cpp --traditional vs. X Windows
- From: neroden at twcny dot rr dot com (Nathanael Nerode)
- To: gcc at gcc dot gnu dot org
- Date: Tue, 4 Nov 2003 01:34:35 -0500
- Subject: Help wanted: cpp --traditional vs. X Windows
There are currently two problems with cpp --traditional (version 3.3, but
I don't see any likely changes in 3.4, although for stupid reasons I've
been unable to test it yet).
Problem 1.
Certain XWindows files use the following demented notation:
/**/#if WIDTH >= 1024
...
/**/#else
...
/**/#endif
in the expectation that those lines will *not* be treated as preprocessor
directives by cpp --traditional.
cpp-3.3, however, treats them as directives.
I'm guessing Xwindows is right here. I can't quite grok the cpptrad.c code,
so I'm hoping that someone else can find the correct place to tell cpp
that a # after a comment does *not* begin a preprocessor directive.
----------
Problem 2.
Some Xwindows files do this:
#define BS \ /* comment */
..... BS
.....
expecting the output:
..... \
.....
This no longer works; apparently the \ is eaten while reading the macro
definition. I'm not sure whether Xwindows is legit in doing this or not.
--
Nathanael Nerode <neroden at gcc.gnu.org>
http://home.twcny.rr.com/nerode/neroden/fdl.html