Blame cpp-test/test-t/e_31.c
Branch: 3e011be9b9edeb3612549c5c9b0f8a3dae280f3f
Packit Service
8bf002
/* e_31.c: Illegal macro calls. */
Packit Service
8bf002
Packit Service
8bf002
/* { dg-do preprocess } */
Packit Service
8bf002
Packit Service
8bf002
#define sub( a, b) (a - b)
Packit Service
8bf002
Packit Service
8bf002
/* 31.1: Too many arguments error. */
Packit Service
8bf002
sub( x, y, z); /* { dg-error "passed 3 arguments, but takes just 2| used with too many \\(3\\) args| More than necessary 2 argument\\(s\\) in macro call" } */
Packit Service
8bf002
Packit Service
8bf002
/* 31.2: Too few arguments error. */
Packit Service
8bf002
sub( x); /* { dg-error "requires 2 arguments, but only 1 given| used with just one arg| Less than necessary 2 argument\\(s\\) in macro call" } */
Packit Service
8bf002