tinycc-devel
[Top][All Lists]
Advanced

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

[Tinycc-devel] macro expansion bug


From: Jay Foad
Subject: [Tinycc-devel] macro expansion bug
Date: Wed, 2 Apr 2014 14:46:36 +0100

Hi,

With tcc I get:

$ cat cat.c
#define CAT2(a,b) a##b
#define CAT(a,b) CAT2(a,b)
#define AB(x) CAT(x,y)
CAT(A,B)(x)
$ ./tcc -E cat.c
# 2 "cat.c"


CAT(x,y)

But I think this is wrong, because gcc -E and clang -E both expand the
last line further to give just:

xy

The test case is massively reduced from some real code!

Jay.



reply via email to

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