On 2/18/19 12:50 PM, Jakub Jelinek wrote:
Hi!

On the following testcase we ICE because name is BIT_NOT_EXPR and
suggest_alternative_in_scoped_enum assumes it is called on IDENTIFIER_NODE
only.

Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux, ok for
trunk?

OK.

There is another issue, starting with 7.x we don't use sensible location in
the diagnostics, 6.x emitted
pr89390.C: In function ‘void foo()’:
pr89390.C:9:3: error: ‘~A’ is not a member of ‘A’
    A::~A (); // { dg-error "'~A' is not a member of 'A'" }
    ^
but 7.x and later emits:
In function ‘void foo()’:
cc1plus: error: ‘~A’ is not a member of ‘A’

This patch doesn't deal with that, but would be nice to provide location,
dunno if it is enough to just use location of ~, or if we need to spend
memory and build ~A as combined range with caret on ~.

I think having a range for a destructor id-expression would be appropriate.

Jason

Reply via email to