https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105840
--- Comment #4 from Jonathan Wakely ---
For a destructor we do a bit better, but it could still be improved.
struct A {
~A();
};
struct C {
~A();
};
105840.C:14:3: error: declaration of ā~Aā as member of āCā
14 | ~A();
| ^
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105840
--- Comment #3 from Marek Polacek ---
Ah, that sounds great to me.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105840
--- Comment #2 from Barry Revzin ---
I think something to this effect maybe?
:9:7: error: attempting to declare constructor for unrelated class 'A';
did you mean to use 'B'?
9 | A(int i);
| ^~
| B
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105840
Marek Polacek changed:
What|Removed |Added
Ever confirmed|0 |1
Keywords|