This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] libstdc++/64367 fix __sso_string to compile with clang
- From: Jonathan Wakely <jwakely at redhat dot com>
- To: libstdc++ at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Mon, 2 Mar 2015 16:50:23 +0000
- Subject: Re: [patch] libstdc++/64367 fix __sso_string to compile with clang
- Authentication-results: sourceware.org; auth=none
- References: <20141221151609 dot GK3134 at redhat dot com>
The same file has another instance of the same problem (which compiles
with G++ in all modes, but Clang rejects in c++98 mode).
Tested x86_64-linux, committed to trunk.
commit 7cf52d6430d73c412f5205098c6cfe0ce7a3d0d5
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Thu Feb 26 13:31:48 2015 +0000
PR libstdc++/64367
* include/std/stdexcept (__sso_string): Don't use non-static member
in sizeof.
diff --git a/libstdc++-v3/include/std/stdexcept b/libstdc++-v3/include/std/stdexcept
index bf3e618..2428919 100644
--- a/libstdc++-v3/include/std/stdexcept
+++ b/libstdc++-v3/include/std/stdexcept
@@ -80,7 +80,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
union {
__str _M_s;
- char _M_bytes[sizeof(_M_s)];
+ char _M_bytes[sizeof(__str)];
};
__sso_string() _GLIBCXX_USE_NOEXCEPT;