[Bug c++/107126] -Wc++20-compat should complain about template-id in out of class definition for destructor
jason at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Oct 3 14:29:01 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107126
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
CC| |jason at gcc dot gnu.org
Summary|GCC accepts invalid out of |-Wc++20-compat should
|class definition for |complain about template-id
|destructor with C++17 |in out of class definition
| |for destructor
Last reconfirmed| |2022-10-03
--- Comment #8 from Jason Merrill <jason at gcc dot gnu.org> ---
As Jonathan documents, this was explicitly well-formed from DR1435 in C++11
until P1787 in C++23. It seems reasonable to also apply the P1787 change to
C++20, treating it as a missing piece of the DR2237 resolution. It seems
undesirable to apply it to C++17 as well.
But it would be helpful for -Wc++20-compat to flag this compatibility issue
Incidentally, we should probably also reduce the C++20 error to a pedwarn.
More information about the Gcc-bugs
mailing list