Details
-
Bug
-
Resolution: Done
-
P2: Important
-
Qt Creator 3.2.2, Qt Creator 3.3.0-beta1
-
None
Description
Sorry for the long title
When a #define references a function-like macro, and passes values to it, the values need to be expanded before they're passed to the function. This mostly affects concatenation operator.
This behavior is different on calls from other statements which are not #defines.
#define concat(x,y) x ## y #define xconcat(x,y) concat(x,y) #define NUM 42 int foo1 = concat(0x, NUM); // should be expanded as 0xNUM, which of course won't compile int foo2 = xconcat(0x, NUM); // should be expanded as 0x42
Attachments
Issue Links
- relates to
-
QTCREATORBUG-12333 Arguments to function-like macros are not expanded before substitution
- Closed