File: u_2.c

package info (click to toggle)
mcpp 2.7.1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 8,024 kB
  • ctags: 29,151
  • sloc: ansic: 35,191; sh: 9,231; makefile: 176; cpp: 84; exp: 18
file content (15 lines) | stat: -rw-r--r-- 529 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/* u_2.c:   Undefined behaviors on undefined constant expression.   */

/* { dg-do preprocess } */

/* u.2.1:   Undefined escape sequence.  */
#if     '\x'    /* { dg-error "no following hex digits| Undefined escape sequence '\\\\x'\n\[^ \]* warning:" } */
#endif

/* u.2.2:   Illegal bit shift count.    */
/* dg-warning, not dg-error to avoid a problem of GCC 4.3 testsuite */
#if     1 << -1 /* { dg-warning "Illegal shift count" } */
#endif
#if     1 << 64 /* { dg-error "integer overflow | Illegal shift count" } */
#endif