Imported Upstream version 4.8.1
[platform/upstream/gcc48.git] / gcc / testsuite / gcc.dg / cpp / macro-exp-tracking-2.c
1 /* 
2    { dg-options "-ftrack-macro-expansion=1" }
3    { dg-do compile }
4 */
5
6 #define OPERATE(OPRD1, OPRT, OPRD2) \
7  OPRD1 OPRT OPRD2;        /* { dg-message "in definition of macro 'OPERATE'" } */
8
9 #define SHIFTL(A,B) \
10   OPERATE (A,<<,B) /* { dg-message "invalid operands to binary <<" } */
11
12 #define MULT(A) \
13   SHIFTL (A,1)     /* { dg-message "in expansion of macro 'SHIFTL'" } */
14
15 void
16 foo ()
17 {
18   MULT (1.0);      /* { dg-message "in expansion of macro 'MULT'" } */
19 }
20