This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Postpone __LINE__ evaluation to the end of #line directives


On further consideration, I'm not convinced there's a bug here at all; I 
don't think it's sufficiently defined in the standard what the current 
token is for the purposes of line numbering when __LINE__ gets expanded to 
be able to say that one or the other value in a directive is wrong.  As 
far as I can tell after checking the reflector email archives, the only 
time WG14 considered anything vaguely relevant was C90 DR#173, which 
didn't receive a response.  
<https://groups.google.com/forum/#!original/comp.std.c/ulBqfulqO_0/P8AzVfP8U5oJ> 
is a statement by the standard editor that some cases were deliberately 
left ambiguous.  So that suggests the bug should be closed as INVALID (but 
if you think this case should be fully defined, you could always file a DR 
with WG14).

-- 
Joseph S. Myers
joseph@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]