File: u_2.c

package info (click to toggle)
mcpp 2.5-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 7,544 kB
  • ctags: 28,000
  • sloc: ansic: 34,825; sh: 3,812; makefile: 120; cpp: 84; exp: 18
file content (14 lines) | stat: -rw-r--r-- 460 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/* 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.    */
#if     1 << -1 /* { dg-error "(i|I)llegal shift count" } */
#endif
#if     1 << 64 /* { dg-error "integer overflow | Illegal shift count" } */
#endif