例
enum rtx_code { #define DEF_RTL_EXPR(ENUM, NAME, FORMAT, CLASS) ENUM , #include "rtl.def" #undef DEF_RTL_EXPR NUM_RTX_CODE };
rtl.def には下記のように DEF_RTL_EXPR を使った定義が羅列されていて、
/* Unknown, or no such operation; the enumeration constant should have value zero. */ DEF_RTL_EXPR(UNKNOWN, "UnKnown", "*", RTX_EXTRA) /* Used in the cselib routines to describe a value. Objects of this kind are only allocated in cselib.c, in an alloc pool instead of in GC memory. The only operand of a VALUE is a cselib_val. var-tracking requires this to have a distinct integral value from DECL codes in trees. */ DEF_RTL_EXPR(VALUE, "value", "0", RTX_OBJ) /* The RTL generated for a DEBUG_EXPR_DECL. It links back to the DEBUG_EXPR_DECL in the first operand. */ DEF_RTL_EXPR(DEBUG_EXPR, "debug_expr", "0", RTX_OBJ)
ENUM のみを残すマクロを定義してから、
#define DEF_RTL_EXPR(ENUM, NAME, FORMAT, CLASS) ENUM ,
include "rtl.def" することで、NAME, FORMAT, CLASS の情報は消えて、ENUM のみが並ぶ。