What\'s the meaning of #line
in the C language? Where would it be used?
It is called the preprocessor line control directive.
The expansions of both __FILE__
and __LINE__
are altered if a #line
directive is used.
It causes the compiler to view the line number of the next source line as the specified number.
Its main use is to make the compiler provide more meaningful error messages.
You can find more explanation and a usage example in IBM's documentation.