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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [cpp/] [trad/] [funlike-2.c] - Diff between revs 149 and 154

Only display areas with differences | Details | Blame | View Log

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

powered by: WebSVN 2.1.0

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