Files
qt-creator/tests/auto/cplusplus/preprocessor/data/identifier-expansion.3.cpp
Erik Verbruggen 60db573660 [C++] Rewrite of the preprocessor.
This rewrite fixes a couple of issues with the pre-processor. It now
supports:
- macros in macro bodies
- stringification of parameters [cpp.stringize]
- the concatenation operator [cpp.concat]
- #include MACRO_HERE
- defined() inside macro bodies used in pp-conditions.

Change-Id: Ifdb78041fb6afadf44f939a4bd66ce2832b8601f
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
2012-03-29 14:28:17 +02:00

15 lines
243 B
C++

#define FOR_EACH_INSTR(V) \
V(ADD) \
V(SUB)
#define DECLARE_INSTR(op) #op,
#define DECLARE_OP_INSTR(op) op_##op,
enum op_code {
FOR_EACH_INSTR(DECLARE_OP_INSTR)
};
static const char *names[] = {
FOR_EACH_INSTR(DECLARE_INSTR)
};