]> git.ipfire.org Git - thirdparty/gcc.git/commit
c++: Fix diagnostics for __is_destructable
authorNathaniel Shead <nathanieloshead@gmail.com>
Thu, 23 Oct 2025 06:10:04 +0000 (17:10 +1100)
committerNathaniel Shead <nathanieloshead@gmail.com>
Sat, 22 Nov 2025 23:45:11 +0000 (10:45 +1100)
commit49acd44ac36a36b659bcead4cec80dde04bbccee
tree09660a267bde8103dc0bbce84cfdd24007ad302a
parentc2ce1b55cd91ea81be2a9c357efa2579695e9f46
c++: Fix diagnostics for __is_destructable

We'd missed providing a diagnostic when checking a non-scalar non-class
type, such as a function type.

gcc/cp/ChangeLog:

* method.cc (destructible_expr): Add explanation when type is
neither class nor scalar.

gcc/testsuite/ChangeLog:

* g++.dg/ext/is_destructible3.C: Add test for function type.

Signed-off-by: Nathaniel Shead <nathanieloshead@gmail.com>
Reviewed-by: Jason Merrill <jason@redhat.com>
gcc/cp/method.cc
gcc/testsuite/g++.dg/ext/is_destructible3.C