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

Packit Service 8bf002
/* u_2.c:   Undefined behaviors on undefined constant expression.   */
Packit Service 8bf002
Packit Service 8bf002
/* { dg-do preprocess } */
Packit Service 8bf002
Packit Service 8bf002
/* u.2.1:   Undefined escape sequence.  */
Packit Service 8bf002
#if     '\x'    /* { dg-error "no following hex digits| Undefined escape sequence '\\\\x'\n\[^ \]* warning:" } */
Packit Service 8bf002
#endif
Packit Service 8bf002
Packit Service 8bf002
/* u.2.2:   Illegal bit shift count.    */
Packit Service 8bf002
/* dg-warning, not dg-error to avoid a problem of GCC 4.3 testsuite */
Packit Service 8bf002
#if     1 << -1 /* { dg-warning "Illegal shift count" } */
Packit Service 8bf002
#endif
Packit Service 8bf002
#if     1 << 64 /* { dg-error "integer overflow | Illegal shift count" } */
Packit Service 8bf002
#endif
Packit Service 8bf002