Blame cpp-test/test-t/e_23_3.c

Packit Service 8bf002
/* e_23_3.c:    ## operator shall not occur at the beginning or at the end of
Packit Service 8bf002
        replacement list for either form of macro definition.   */
Packit Service 8bf002
Packit Service 8bf002
/* { dg-do preprocess } */
Packit Service 8bf002
Packit Service 8bf002
/* 23.3:    In object-like macro.   */
Packit Service 8bf002
#define con     ## name     /* { dg-error "'##' cannot appear at either end of a macro expansion| `##' at start of macro definition| No token before ##" } */
Packit Service 8bf002
#define cat     12 ##       /* { dg-error "'##' cannot appear at either end of a macro expansion| No token after ##" } */
Packit Service 8bf002
Packit Service 8bf002
/* 23.4:    In function-like macro. */
Packit Service 8bf002
#define CON( a, b)  ## a ## b   /* { dg-error "'##' cannot appear at either end of a macro expansion| `##' at start of macro definition| No token before ##" } */
Packit Service 8bf002
#define CAT( b, c)  b ## c ##   /* { dg-error "'##' cannot appear at either end of a macro expansion| No token after ##" } */
Packit Service 8bf002