Blame test-c/n_7.c

Packit Service 8bf002
/* n_7.c:   #line directive.    */
Packit Service 8bf002
Packit Service 8bf002
#include    "defs.h"
Packit Service 8bf002
Packit Service 8bf002
main( void)
Packit Service 8bf002
{
Packit Service 8bf002
    fputs( "started\n", stderr);
Packit Service 8bf002
Packit Service 8bf002
/* 7.1: Line number and filename.   */
Packit Service 8bf002
#line   1234    "cpp"
Packit Service 8bf002
    assert( __LINE__ == 1234);
Packit Service 8bf002
    assert( strcmp( __FILE__, "cpp") == 0);
Packit Service 8bf002
Packit Service 8bf002
/* 7.2: Filename argument is optional.  */
Packit Service 8bf002
#line   2345
Packit Service 8bf002
    assert( __LINE__ == 2345);
Packit Service 8bf002
    assert( strcmp( __FILE__, "cpp") == 0);
Packit Service 8bf002
Packit Service 8bf002
/* 7.3: Argument with macro.    */
Packit Service 8bf002
#define LINE_AND_FILENAME   1234 "n_7.c"
Packit Service 8bf002
#line   LINE_AND_FILENAME
Packit Service 8bf002
    assert( __LINE__ == 1234);
Packit Service 8bf002
    assert( strcmp( __FILE__, "n_7.c") == 0);
Packit Service 8bf002
Packit Service 8bf002
    fputs( "success\n", stderr);
Packit Service 8bf002
    return  0;
Packit Service 8bf002
}
Packit Service 8bf002