OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [cpp/] [trad/] [funlike-2.c] - Rev 689

Compare with Previous | Blame | View Log

/* Test that nested commas and parentheses in macro arguments are
   OK.  */
 
/* { dg-do preprocess } */
 
#define f(x) x
#define g(x, y) x y
 
#if f((1)) != 1
# error		/* { dg-bogus "error" "nested parens 1" } */
#endif
 
#if f((1, 2)) != 2
# error		/* { dg-bogus "error" "nested comma 1" } */
#endif
 
#if g(, (1)) != 1
# error		/* { dg-bogus "error" "nested parens 2" } */
#endif
 
#if g((1, 2), + 3) != 5
# error		/* { dg-bogus "error" "nested comma 2" } */
#endif
 

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.