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

Packit Service 8bf002
/* n_19.c:  Valid re-definitions of macros. */
Packit Service 8bf002
Packit Service 8bf002
/* Excerpts from ISO C 6.8.3 "Examples".    */
Packit Service 8bf002
#define OBJ_LIKE        (1-1)
Packit Service 8bf002
#define FTN_LIKE(a)     ( a )
Packit Service 8bf002
Packit Service 8bf002
/* 19.1:    */
Packit Service 8bf002
#define OBJ_LIKE    /* white space */  (1-1) /* other */
Packit Service 8bf002
Packit Service 8bf002
/* 19.2:    */
Packit Service 8bf002
#define FTN_LIKE( a     )(  /* note the white space */  \
Packit Service 8bf002
                        a  /* other stuff on this line
Packit Service 8bf002
                           */ )
Packit Service 8bf002
/*  ( c );  */
Packit Service 8bf002
    FTN_LIKE( c);
Packit Service 8bf002
Packit Service 8bf002
/* { dg-do preprocess }
Packit Service 8bf002
   { dg-final { if ![file exist n_19.i] { return }                      } }
Packit Service 8bf002
   { dg-final { if \{ [grep n_19.i "\\( *c *\\)"] != ""         \} \{   } }
Packit Service 8bf002
   { dg-final { return \}                                               } }
Packit Service 8bf002
   { dg-final { fail "n_19.c: valid re-definition of macros"            } }
Packit Service 8bf002
 */
Packit Service 8bf002