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] - Blame information for rev 154

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
/* Test that nested commas and parentheses in macro arguments are
2
   OK.  */
3
 
4
/* { dg-do preprocess } */
5
 
6
#define f(x) x
7
#define g(x, y) x y
8
 
9
#if f((1)) != 1
10
# error         /* { dg-bogus "error" "nested parens 1" } */
11
#endif
12
 
13
#if f((1, 2)) != 2
14
# error         /* { dg-bogus "error" "nested comma 1" } */
15
#endif
16
 
17
#if g(, (1)) != 1
18
# error         /* { dg-bogus "error" "nested parens 2" } */
19
#endif
20
 
21
#if g((1, 2), + 3) != 5
22
# error         /* { dg-bogus "error" "nested comma 2" } */
23
#endif

powered by: WebSVN 2.1.0

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