https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43253
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
Last reconfirmed| |2021-07-16
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Now we say:
43253.C: In function 'int main()':
43253.C:4:13: error: expected identifier before 'int'
4 | x->~int();
| ^~~
I suppose we could add a more specific diagnostic saying you can't do this.
It's not a high priority, because the code is nonsense anyway. Why would you
want to destroy an int explicitly? A pseudo-destructor call is only useful in
generic code where you don't know what the type is.