On 2014-04-02 14:46:36 +0100, Jay Foad wrote: > 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
For future testcases, this means that this wouldn't be equivalent to: #define CAT2(a,b) a##b(x) #define CAT(a,b) CAT2(a,b) #define AB(x) CAT(x,y) CAT(A,B) and #define CAT2(a,b) a##b #define CAT(a,b) CAT2(a,b)(x) #define AB(x) CAT(x,y) CAT(A,B) which both give: CAT(x,y) for the last line. FYI, icc (ICC) 13.1.0 20130121 behaves like gcc. -- Vincent Lefèvre <[email protected]> - Web: <https://www.vinc17.net/> 100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/> Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon) _______________________________________________ Tinycc-devel mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/tinycc-devel
