File: u_line.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 (17 lines) | stat: -rw-r--r-- 684 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/* u_line.c:    Undefined behaviors on out-of-range #line number.   */

/* { dg-do preprocess } */
/* { dg-options "-std=c99 -pedantic-errors" } */

/*  C99: Line number argument of #line directive should be in range of
    [1..2147483647] */

#line   0   /* { dg-error "out of range" }  */
#line   11  /* Restore to correct line number   */
#line   2147483647  /* valid here   */
/* line 2147483647  */
/* line 2147483648 ? : out of range */
    __LINE__;   /* 2147483649 ? or -2147483647 ?,
                maybe warned as an out-of-range */
/* { dg-warning "out of range| got beyond range\n\[\^ \]* warning: Line number \"\[\-0-9\]*\" is out of range" "" { target *-*-* } 0 }  */