tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] Preprocessor bug prevents macro expansion


From: grischka
Subject: Re: [Tinycc-devel] Preprocessor bug prevents macro expansion
Date: Fri, 29 Jan 2010 18:07:11 +0100
User-agent: Thunderbird 2.0.0.23 (Windows/20090812)

Alexandre Becoulet wrote:
Hi list,

Tcc fails to compile some code due to what seems like a preprocessor bug. Here is a test case:

#define CONCAT(a, b, c) a##b##c
#define FOO(a, b, c) CONCAT(a, b, c)
CONCAT(F, O, O)(X, Y, Z)

This should expand to XYZ (tryed with gcc, clang, intel and sun) but tcc preprocessor expands to CONCAT(X, Y, Z).

The expansion is performed properly when commenting out some nested macro check code in the preprocessor.


Yes, there are bugs.  Here is another one:

 #define v s.v
 #define S(x) x
 S(v)

Should expand to s.v but does to s.s.v

--- grischka






reply via email to

[Prev in Thread] Current Thread [Next in Thread]