This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] libstdc++/64367 fix __sso_string to compile with clang


Tested powerpc64-linux, committed to trunk.


commit 922a84d1db99455f6d8900453ea5615f93b124f1
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Sun Dec 21 13:54:39 2014 +0000

    	PR libstdc++/64367
    	* include/std/stdexcept: Don't use non-static member in sizeof.

diff --git a/libstdc++-v3/include/std/stdexcept b/libstdc++-v3/include/std/stdexcept
index c927f05..e049a6e 100644
--- a/libstdc++-v3/include/std/stdexcept
+++ b/libstdc++-v3/include/std/stdexcept
@@ -49,7 +49,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
   {
     union {
       const char* _M_p;
-      char _M_bytes[sizeof(_M_p)];
+      char _M_bytes[sizeof(const char*)];
     };
 
     __cow_string();

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]