Blame cpp-test/test-t/e_14_2.c
|
Packit Service |
8bf002 |
/* e_14_2.c: Illegal #if expressions-2. */
|
|
Packit Service |
8bf002 |
|
|
Packit Service |
8bf002 |
/* { dg-do preprocess } */
|
|
Packit Service |
8bf002 |
/* { dg-options "-ansi -pedantic-errors -w" } */
|
|
Packit Service |
8bf002 |
|
|
Packit Service |
8bf002 |
#define A 1
|
|
Packit Service |
8bf002 |
#define B 1
|
|
Packit Service |
8bf002 |
|
|
Packit Service |
8bf002 |
/* 14.2: Operators =, +=, ++, etc. are not allowed in #if expression.*/
|
|
Packit Service |
8bf002 |
|
|
Packit Service |
8bf002 |
#if A = B /* { dg-error "is not valid| (parse|syntax) error| Can't use the operator" } */
|
|
Packit Service |
8bf002 |
#endif
|
|
Packit Service |
8bf002 |
#if A++ B /* { dg-error "is not (valid|allowed)| Can't use the operator" } */
|
|
Packit Service |
8bf002 |
#endif
|
|
Packit Service |
8bf002 |
#if A.B /* { dg-error "is not valid| (parse|syntax) error| empty #if expression| Can't use the operator" } */
|
|
Packit Service |
8bf002 |
#endif
|
|
Packit Service |
8bf002 |
|