https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70518

--- Comment #4 from joseph at codesourcery dot com <joseph at codesourcery dot 
com> ---
On Sun, 3 Apr 2016, elyk03 at gmail dot com wrote:

> Should #line be processed unconditionally?  I know the preprocessor has to 
> keep

It should not be processed in skipped blocks.  See C11 6.10.1#6: "Each 
directive’s condition is checked in order. If it evaluates to false 
(zero), the group that it controls is skipped: directives are processed 
only through the name that determines the directive in order to keep track 
of the level of nested conditionals; the rest of the directives’ 
preprocessing tokens are ignored, as are the other preprocessing tokens in 
the group.".

This means, for example, that

#if 0
#line invalid line directive
#endif

is valid, whereas that #line directive would not be valid outside #if 0.

Reply via email to