This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [CPP] fix some diagnostic locations
2008/10/31 Tom Tromey <tromey@redhat.com>:
>>>>>> "Manuel" == Manuel López-Ibáñez <lopezibanez@gmail.com> writes:
>
> FWIW -- I have an unfinished patch here that fixes this problem (in a
> different way) plus a number of other location-related problems in
> libcpp. I went through most of the cpp test cases in gcc and fixed
> them to use column numbers.
>
> The patch breaks some location handling in traditional mode, though,
> so I haven't checked it in. If you plan to do more work in this area,
> and you'd like it as a starting point, I can send it.
Yes definitely. Because this patch is a side-effect of making libcpp
use the diagnostics machinery. If you have an alternative, I will like
to know about it.
> Manuel> top[-1].value = num_unary_op (pfile, top->value, top->op);
> Manuel> + top[-1].loc = top->loc;
>
> Don't line up the '='. There are a few cases of this.
So, are you sure you want me to commit the patch? If your solution is
better... I only wanted to fix this because when libcpp uses the
diagnostics machinery, not only the columns currently generated are
wrong but the whole location information (because the logic of the
internal input location of libcpp is not valid anymore).
Cheers,
Manuel.