[clang] [clang][PAC] Fix builtins that claim address discriminated types are bitwise compatible (PR #154490)
John McCall via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 22 13:17:45 PDT 2025
================
@@ -74,7 +74,7 @@ static_assert(__is_trivially_destructible(S3));
static_assert(!__is_trivially_copyable(S3));
static_assert(!__is_trivially_relocatable(S3)); // expected-warning{{deprecated}}
//FIXME
-static_assert(__builtin_is_cpp_trivially_relocatable(S3));
+static_assert(!__builtin_is_cpp_trivially_relocatable(S3));
----------------
rjmccall wrote:
Hmm, is this right? My understanding is that, while the pre-standardization concept of trivial relocatability implies bitwise relocation, the standardized concept does not and allows for arbitrary compiler-synthesized logic as long as that logic can't cause arbitrary side-effects. I would expect address-discriminated ptrauth to not disqualify a type from that.
https://github.com/llvm/llvm-project/pull/154490
More information about the cfe-commits
mailing list