https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116673
--- Comment #6 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jonathan Wakely <r...@gcc.gnu.org>: https://gcc.gnu.org/g:9fe57e4879de93b6e3c7b4c226f42d5f3a48474f commit r15-3614-g9fe57e4879de93b6e3c7b4c226f42d5f3a48474f Author: Jonathan Wakely <jwak...@redhat.com> Date: Wed Sep 11 11:47:44 2024 +0100 c++: Make __builtin_launder reject invalid types [PR116673] The standard says that std::launder is ill-formed for function pointers and cv void pointers, so there's no reason for __builtin_launder to accept them. This change allows implementations of std::launder to defer to the built-in for error checking, although libstdc++ will continue to diagnose it directly for more user-friendly diagnostics. PR c++/116673 gcc/cp/ChangeLog: * semantics.cc (finish_builtin_launder): Diagnose function pointers and cv void pointers. gcc/testsuite/ChangeLog: * g++.dg/cpp1z/launder2.C: Adjust dg-error strings. * g++.dg/cpp1z/launder10.C: New test.