File: u_1_17.c

package info (click to toggle)
mcpp 2.7.2-1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 8,152 kB
  • ctags: 29,136
  • sloc: ansic: 35,238; sh: 9,241; makefile: 176; cpp: 84; exp: 18
file content (27 lines) | stat: -rw-r--r-- 662 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/* u_1_17.c:    Undefined behaviors on out-of-range #line number.   */

#include    <stdio.h>

main( void)
{

/* u.1.17:  Line number argument of #line directive should be in range of
        [1,32767].  */
#line   32767   /* valid here   */
/* line 32767   */
/* line 32768 ? : out of range  */
    printf( "%d\n", __LINE__);
                    /* 32769 ? or -32767 ?, maybe warned as an out-of-range */
#line   0
#line   32768

/* u.1.18:  Line number argument of #line directive should be written in
        decimal digits. */
#line   0x1000

/*  23, u_1_17.c or other undefined results.    */
    printf( "%d, %s\n", __LINE__, __FILE__);

    return  0;
}