Synopsis - Issue Tracker
All I can say is, that Wave produces XY as well, which makes me believe that this is correct ;-)
But seriously, I don't see any reason why the second CAT shouldn't be expanded because the CAT macro is disabled only during its expansion (disabling ends on the first ')') and it is re-enabled afterwards. To illustrate the actual expansion process I've attached the expansion trace produced by Wave from the given code snippet:
file test.cpp:
#pragma wave trace (on)
#define CAT(a, b) CAT_(a, b)
#define CAT_(a, b) a ## b
#define AB(x, y) CAT(x, y)
CAT(A, B)(X, Y)
command line:
wave --traceto trace.txt test.cpp
Regards Hartmut |
| File name | Uploaded |
|
trace.txt
|
hkaiser,
2005-03-09.14:18:20
|
|
| Date |
User |
Action |
Args |
| 2005-03-09 14:18:21 | hkaiser | set | messageid: <1110377900.43.0.447176611995.bug60@synopsis.fresco.org> |
| 2005-03-09 14:18:21 | hkaiser | set | recipients:
+ hkaiser, dave, stefan |
| 2005-03-09 14:18:20 | hkaiser | link | bug60 messages |
| 2005-03-09 14:18:20 | hkaiser | create | |
|