[patch] libstdc++/66902 Make _S_debug_messages static.
Jonathan Wakely
jwakely@redhat.com
Thu Sep 3 19:06:00 GMT 2015
On 26/08/15 21:22 +0100, Jonathan Wakely wrote:
>This patch removes a public symbol from the .so, which is generally a
>bad thing, but there should be no users of this anywhere (it's never
>declared in any public header).
>
>For targets using symbol versioning this isn't exported at all, as it
>isn't in the linker script, so this really just makes other targets
>consistent with the ones using versioned symbols.
>
>Tested powerpc64le-linux and dragonfly-4.2, committed to trunk
>commit d35fbf8937930554af62a7320806abecf7381175
>Author: Jonathan Wakely <jwakely@redhat.com>
>Date: Fri Jul 17 10:15:03 2015 +0100
>
> libstdc++/66902 Make _S_debug_messages static.
>
> PR libstdc++/66902
> * src/c++11/debug.cc (_S_debug_messages): Give internal linkage.
>
>diff --git a/libstdc++-v3/src/c++11/debug.cc b/libstdc++-v3/src/c++11/debug.cc
>index 997c0f3..c435de7 100644
>--- a/libstdc++-v3/src/c++11/debug.cc
>+++ b/libstdc++-v3/src/c++11/debug.cc
>@@ -103,7 +103,7 @@ namespace
>
> namespace __gnu_debug
> {
>- const char* _S_debug_messages[] =
>+ static const char* _S_debug_messages[] =
> {
> // General Checks
> "function requires a valid iterator range [%1.name;, %2.name;)",
Jason suggested making the array const, which still gives it internal
linkage but prevents accidentally changing it, so even better.
Tested powerpc64le-linux, committed to trunk.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.txt
Type: text/x-patch
Size: 650 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20150903/a874fb11/attachment.bin>
More information about the Libstdc++
mailing list