This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Postpone __LINE__ evaluation to the end of #line directives
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: <mtewoodbury at gmail dot com>
- Cc: <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 27 Nov 2013 21:10:00 +0000
- Subject: Re: [PATCH] Postpone __LINE__ evaluation to the end of #line directives
- Authentication-results: sourceware.org; auth=none
- References: <1385548162-1883-1-git-send-email-mtewoodbury at gmail dot com>
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