This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]