From 7a5d1d34eec4b5422c29d756ae7c5521115ec6ea Mon Sep 17 00:00:00 2001 From: Torvald Riegel Date: Sun, 17 Jan 2016 17:43:37 +0000 Subject: [PATCH] libstdc++: Fix static_assert. * src/c++11/cow-stdexcept.cc (txnal_read_ptr): Fix static_assert. From-SVN: r232483 --- libstdc++-v3/ChangeLog | 4 ++++ libstdc++-v3/src/c++11/cow-stdexcept.cc | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 9690193..c4c3598 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,7 @@ +2016-01-17 Torvald Riegel + + * src/c++11/cow-stdexcept.cc (txnal_read_ptr): Fix static_assert. + 2016-01-16 H.J. Lu * config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Add diff --git a/libstdc++-v3/src/c++11/cow-stdexcept.cc b/libstdc++-v3/src/c++11/cow-stdexcept.cc index afc3f6c..e2d7e76 100644 --- a/libstdc++-v3/src/c++11/cow-stdexcept.cc +++ b/libstdc++-v3/src/c++11/cow-stdexcept.cc @@ -278,8 +278,8 @@ _txnal_cow_string_C1_for_exceptions(void* that, const char* s, void *exc) static void* txnal_read_ptr(void* const * ptr) { static_assert(sizeof(uint64_t) == sizeof(void*) - || sizeof(uint32_t) == sizeof(void*)); - // FIXME make a true compile-time choice to prevent warnings. + || sizeof(uint32_t) == sizeof(void*), + "Pointers must be 32 bits or 64 bits wide"); #if __UINTPTR_MAX__ == __UINT64_MAX__ return (void*)_ITM_RU8((const uint64_t*)ptr); #else -- 2.7.4