1 /* 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 24