view gcc/testsuite/gcc.dg/cpp/macro-exp-tracking-1.c @ 132:d34655255c78

update gcc-8.2
author mir3636
date Thu, 25 Oct 2018 10:21:07 +0900
parents 04ced10e8804
children
line wrap: on
line source

/*
   { 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" } */
}