Alessandro Bonazzi e075990ed3 Patch level : 12.0 no-patch
Files correlati     :
Commento            :

Aggiunto il preprocessore c++ mcpp per sostituire il compilatore nella compilazione delle maschere.
2020-11-28 16:24:08 +01:00

18 lines
550 B
C

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