#line Directive

The #line directive resets the line numbering, such that

   foo = bar * quux;

#line 200

   bar = pow(baz, 5);

... would cause the second assignment to be treated as being on line 201 for error reporting purposes. The directive can also take a filename as a second argument; thus, if in file craze.c, you had the following code:

   foo = bar * quux;

#line 1, "sex.c"

   bar = pow(baz, 5);

... the compiler would report errors following the directive to be treated as if the were numbered starting at line 1 or file sex.c. As with #error, this directive is primarily for used for debugging.


Contents Previous Next