[Bug c++/126007] __builtin_is_implicit_lifetime disagrees with Clang
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Jun 30 07:27:12 GMT 2026
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126007
--- Comment #2 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:2be174f14c0bea9c0fe979467104d7d9027fe093
commit r17-1997-g2be174f14c0bea9c0fe979467104d7d9027fe093
Author: Jakub Jelinek <jakub@redhat.com>
Date: Tue Jun 30 09:26:29 2026 +0200
c++: Fix up __builtin_is_implicit_lifetime [PR126007]
https://eel.is/c++draft/class.prop#8.2 says that implicit lifetime
class shall have at least one trivial eligible constructor.
We currently walk all ctors and if it is default/copy/move ctor
which is trivial and not deleted, return true, but as the following
testcase
shows, we should check also for unsatisfied constraints.
2026-06-30 Jakub Jelinek <jakub@redhat.com>
PR c++/126007
* tree.cc (eligible_special_member_function_p): New function.
(implicit_lifetime_type_p): Use true instead of 1 in function
comment.
Add some further comments. Use eligible_special_member_function_p
instead of !DECL_DELETED_FN.
* g++.dg/ext/is_implicit_lifetime3.C: New test.
Reviewed-by: Jason Merrill <jason@redhat.com>
More information about the Gcc-bugs
mailing list