Debian Codegraph @

gcc/testsuite/gcc.dg/cpp/macro-exp-tracking-1.c

raw
1 /*
2 { dg-options "-ftrack-macro-expansion=1" }
3 { dg-do compile }
4 */
5
6 #define OPERATE(OPRD1, OPRT, OPRD2) \
7 do \
8 { \
9 OPRD1 OPRT OPRD2; /* { dg-message "definition" }*/ \
10 } while (0)
11
12 #define SHIFTL(A,B) \
13 OPERATE (A,<<,B) /* { dg-error "invalid operands" } */
14
15 void
16 foo ()
17 {
18 SHIFTL (0.1,0.2); /* { dg-message "in expansion of macro \[^\n\r\]SHIFTL" } */
19 }