diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2024-09-11 11:47:44 +0100 |
---|---|---|
committer | Jonathan Wakely <redi@gcc.gnu.org> | 2024-09-12 20:42:48 +0100 |
commit | 9fe57e4879de93b6e3c7b4c226f42d5f3a48474f (patch) | |
tree | 3c5f6531054e747488806b2b131af161c26806bc /libbacktrace/zstdtest.c | |
parent | 2847a541c1f19b67ae84be8d0f6dc8e1f9371d16 (diff) | |
download | gcc-9fe57e4879de93b6e3c7b4c226f42d5f3a48474f.zip gcc-9fe57e4879de93b6e3c7b4c226f42d5f3a48474f.tar.gz gcc-9fe57e4879de93b6e3c7b4c226f42d5f3a48474f.tar.bz2 |
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.
Diffstat (limited to 'libbacktrace/zstdtest.c')
0 files changed, 0 insertions, 0 deletions