[patch] PR 31754/C++ - make -fshow-column produce more accurate column numbers

Manuel López-Ibáñez lopezibanez@gmail.com
Thu Jun 26 14:24:00 GMT 2008


2008/6/26 Dodji Seketeli <dseketel@redhat.com>:
> Manuel López-Ibáñez a écrit :
>
> [...]
>
>>
>>> Dodji> +  //following column number is not accurate enough but will make
>>> it for now
>>> Dodji> +  static const ; // { dg-error "10: error: declaration does not
>>> declare anything" }
>>
>> ... is a hack. dg-error/dg-warning should get an additional (optional)
>> parameter similar to the line number that allows to define a column
>> number. That is my opinion, so you should ask a testsuite maintainer,
>> like Janis Johnson.
>
> You are right. Do you think this we proceed via baby steps ? I mean could
> the patch get in like that and then later I will try and add those extra
> parameters to dg-error/dg-warning ?

On the one hand, if this goes in, it is going to be difficult to
notice it and change it afterwards. On the other hand, I understand
that implementing a column parameter for the various dg-* things may
be difficult. DejaGNU is not the easiest or enjoyable part of GCC to
hack. After all, we are still using the "dg-error "error:" hack
everywhere except in the C testsuite.

Anyway, my opinion doesn't matter since I can't approve patches.
Maintainers should voice their preference here. At the minimum, if
this goes in like this, you could open a PR about the missing
"column-number" parameter to dg-* and point to this testcase, so if it
ever gets fixed, the testcase can be updated.

BTW, if you plan to keep hacking on column numbers. I have an
experimental patch to add caret diagnostics that may help you to
pin-point where a location is actually pointing to.

Cheers,

Manuel.



More information about the Gcc-patches mailing list