aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/cpp/macro-exp-tracking-1.c
blob: 28ef7955c9bc8a9cf66c3d3e91a30c755ee4fa85 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/*
   { dg-options "-ftrack-macro-expansion=1" }
   { dg-do compile }
*/

#define OPERATE(OPRD1, OPRT, OPRD2) \
do \
{ \
  OPRD1 OPRT OPRD2; /* { dg-message "definition" }*/ 	   \
} while (0)

#define SHIFTL(A,B) \
  OPERATE (A,<<,B) /* { dg-error "invalid operands" } */

void
foo ()
{
  SHIFTL (0.1,0.2); /* { dg-message "in expansion of macro \[^\n\r\]SHIFTL" } */
}