public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [patch] libstdc++/66902 Make _S_debug_messages static.
@ 2015-08-26 20:26 Jonathan Wakely
  2015-09-03 19:14 ` Jonathan Wakely
  0 siblings, 1 reply; 2+ messages in thread
From: Jonathan Wakely @ 2015-08-26 20:26 UTC (permalink / raw)
  To: libstdc++, gcc-patches

[-- Attachment #1: Type: text/plain, Size: 424 bytes --]

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

[-- Attachment #2: patch.txt --]
[-- Type: text/x-patch, Size: 706 bytes --]

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;)",

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [patch] libstdc++/66902 Make _S_debug_messages static.
  2015-08-26 20:26 [patch] libstdc++/66902 Make _S_debug_messages static Jonathan Wakely
@ 2015-09-03 19:14 ` Jonathan Wakely
  0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Wakely @ 2015-09-03 19:14 UTC (permalink / raw)
  To: libstdc++, gcc-patches; +Cc: jason

[-- Attachment #1: Type: text/plain, Size: 1394 bytes --]

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.



[-- Attachment #2: patch.txt --]
[-- Type: text/x-patch, Size: 650 bytes --]

commit 370c0be6b4c82c0769b9808f7a7b378dc49a1a8a
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Thu Sep 3 19:56:16 2015 +0100

    	PR libstdc++/66902
    	* src/c++11/debug.cc (_S_debug_messages): Make array const.

diff --git a/libstdc++-v3/src/c++11/debug.cc b/libstdc++-v3/src/c++11/debug.cc
index c435de7..ac3ac67 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
 {
-  static const char* _S_debug_messages[] =
+  const char* const _S_debug_messages[] =
   {
     // General Checks
     "function requires a valid iterator range [%1.name;, %2.name;)",

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-09-03 19:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-26 20:26 [patch] libstdc++/66902 Make _S_debug_messages static Jonathan Wakely
2015-09-03 19:14 ` Jonathan Wakely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).