public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/66902] New: _S_debug_messages is unneccessary public
@ 2015-07-17 2:18 persgray at gmail dot com
2015-07-17 9:13 ` [Bug libstdc++/66902] " redi at gcc dot gnu.org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: persgray at gmail dot com @ 2015-07-17 2:18 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66902
Bug ID: 66902
Summary: _S_debug_messages is unneccessary public
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: minor
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: persgray at gmail dot com
Target Milestone: ---
Created attachment 36000
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36000&action=edit
proposed patch
The _S_debug_messages array is defined in libstdc++-v3/src/c++11/debug.cc
without "static" modifier, therefore becoming exported one. But it isn't used
in GCC anywhere outside the debug.cc source module. I found no users installed
in my laptop running many KDE-, GTK- and console-based programs.
On the other side, size of _S_debug_messages differs in different versions of
libstdc++. This way, while libstdc++ 4.9 is ABI-compatible with libstdc++ 4.2,
this particular symbol causes warnings from ld.so (at least here on OpenBSD).
Yes, libstdc++ versions are "mixed": some software requires decent versions of
GCC and doesn't build on the base one (4.2.1); therefore, such software gets
built and linked with GCC 4.9 (as of now), and libstdc++ 4.9 is forced to be
searched for symbols before libstdc++ 4.2. This works in general, but there is
a nasty warning produced:
WARNING: symbol(_ZN11__gnu_debug17_S_debug_messagesE) size mismatch, relink
your program
This happens because _S_debug_messages contains different number of strings in
different libstdc++ versions.
Since there is no real reason to keep _S_debug_messages public, I propose
making it static. There is an interface for accessing this array:
const _Error_formatter&
_Error_formatter::_M_message(_Debug_msg_id __id) const
{ return this->_M_message(_S_debug_messages[__id]); }
So the lack of "static" keyword looks like a simple overlook problem.
The attached patch simply adds "static" keyword. I've been running with this
patch for many weeks without any problem on OpenBSD/amd64.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libstdc++/66902] _S_debug_messages is unneccessary public
2015-07-17 2:18 [Bug libstdc++/66902] New: _S_debug_messages is unneccessary public persgray at gmail dot com
@ 2015-07-17 9:13 ` redi at gcc dot gnu.org
2015-08-26 21:01 ` redi at gcc dot gnu.org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: redi at gcc dot gnu.org @ 2015-07-17 9:13 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66902
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2015-07-17
Ever confirmed|0 |1
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
The symbol is not exported on targets using a linker script for symbol
versioning (GNU, Solaris, possibly Windows), so I see no reason we can't make
that true for all targets.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libstdc++/66902] _S_debug_messages is unneccessary public
2015-07-17 2:18 [Bug libstdc++/66902] New: _S_debug_messages is unneccessary public persgray at gmail dot com
2015-07-17 9:13 ` [Bug libstdc++/66902] " redi at gcc dot gnu.org
@ 2015-08-26 21:01 ` redi at gcc dot gnu.org
2015-09-03 19:05 ` redi at gcc dot gnu.org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: redi at gcc dot gnu.org @ 2015-08-26 21:01 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66902
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
Target Milestone|--- |6.0
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Fixed on trunk.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libstdc++/66902] _S_debug_messages is unneccessary public
2015-07-17 2:18 [Bug libstdc++/66902] New: _S_debug_messages is unneccessary public persgray at gmail dot com
2015-07-17 9:13 ` [Bug libstdc++/66902] " redi at gcc dot gnu.org
2015-08-26 21:01 ` redi at gcc dot gnu.org
@ 2015-09-03 19:05 ` redi at gcc dot gnu.org
2015-09-11 10:09 ` persgray at gmail dot com
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: redi at gcc dot gnu.org @ 2015-09-03 19:05 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66902
--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Author: redi
Date: Thu Sep 3 19:05:15 2015
New Revision: 227466
URL: https://gcc.gnu.org/viewcvs?rev=227466&root=gcc&view=rev
Log:
PR libstdc++/66902
* src/c++11/debug.cc (_S_debug_messages): Make array const.
Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/src/c++11/debug.cc
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libstdc++/66902] _S_debug_messages is unneccessary public
2015-07-17 2:18 [Bug libstdc++/66902] New: _S_debug_messages is unneccessary public persgray at gmail dot com
` (2 preceding siblings ...)
2015-09-03 19:05 ` redi at gcc dot gnu.org
@ 2015-09-11 10:09 ` persgray at gmail dot com
2015-09-11 10:38 ` redi at gcc dot gnu.org
2015-09-11 11:13 ` persgray at gmail dot com
5 siblings, 0 replies; 7+ messages in thread
From: persgray at gmail dot com @ 2015-09-11 10:09 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66902
--- Comment #5 from Vadim Zhukov <persgray at gmail dot com> ---
(In reply to Jonathan Wakely from comment #4)
> Author: redi
> Date: Thu Sep 3 19:05:15 2015
> New Revision: 227466
>
> URL: https://gcc.gnu.org/viewcvs?rev=227466&root=gcc&view=rev
> Log:
> PR libstdc++/66902
> * src/c++11/debug.cc (_S_debug_messages): Make array const.
>
> Modified:
> trunk/libstdc++-v3/ChangeLog
> trunk/libstdc++-v3/src/c++11/debug.cc
I see that you removed "static" modifier in that commit, effectively making the
array in question exported again. Was it intended?
>From gcc-bugs-return-496944-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri Sep 11 10:13:34 2015
Return-Path: <gcc-bugs-return-496944-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 1177 invoked by alias); 11 Sep 2015 10:13:34 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 127963 invoked by uid 48); 11 Sep 2015 10:13:30 -0000
From: "rainer@emrich-ebersheim.de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug bootstrap/67546] bootstrap broken on x86_64-w64-mingw32, error: '::unsetenv' has not been declared in gcc.c
Date: Fri, 11 Sep 2015 10:13:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: bootstrap
X-Bugzilla-Version: 6.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: rainer@emrich-ebersheim.de
X-Bugzilla-Status: NEW
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-67546-4-Ns9yk1Zsx8@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-67546-4@http.gcc.gnu.org/bugzilla/>
References: <bug-67546-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-09/txt/msg00922.txt.bz2
Content-length: 341
https://gcc.gnu.org/bugzilla/show_bug.cgi?idg546
--- Comment #2 from Rainer Emrich <rainer@emrich-ebersheim.de> ---
(In reply to Kai Tietz from comment #1)
> I added to mingw-w64's libwinpthread a work-a-round for this sloopy code in
> libgomp. Nevertheless issue should be fixed IMO in libgomp, too
Wrong PR, this belongs to PR67141.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libstdc++/66902] _S_debug_messages is unneccessary public
2015-07-17 2:18 [Bug libstdc++/66902] New: _S_debug_messages is unneccessary public persgray at gmail dot com
` (3 preceding siblings ...)
2015-09-11 10:09 ` persgray at gmail dot com
@ 2015-09-11 10:38 ` redi at gcc dot gnu.org
2015-09-11 11:13 ` persgray at gmail dot com
5 siblings, 0 replies; 7+ messages in thread
From: redi at gcc dot gnu.org @ 2015-09-11 10:38 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66902
--- Comment #6 from Jonathan Wakely <redi at gcc dot gnu.org> ---
3.5 [basic.link]:
-3- A name having namespace scope (3.3.6) has internal linkage if it is the
name of
— a variable, function or function template that is explicitly declared
static; or,
— a variable of non-volatile const-qualified type that is neither
explicitly declared extern nor previously declared to have external
linkage; or
— a data member of an anonymous union.
The first bullet applied when it was explicitly declared static and the second
bullet applies now that it is a const-qualified type at namespace scope. In
both cases it has internal linkage, so you should not see a global symbol and
should not get the warning.
>From gcc-bugs-return-496949-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri Sep 11 10:54:21 2015
Return-Path: <gcc-bugs-return-496949-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 42703 invoked by alias); 11 Sep 2015 10:54:21 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 42654 invoked by uid 48); 11 Sep 2015 10:54:18 -0000
From: "olegendo at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug rtl-optimization/58517] ifcvt (after combine) puts ccreg clobbering insn between ccset insn and ccreg use
Date: Fri, 11 Sep 2015 10:54:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: rtl-optimization
X-Bugzilla-Version: 4.9.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: olegendo at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: cc
Message-ID: <bug-58517-4-QrarunbiN3@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-58517-4@http.gcc.gnu.org/bugzilla/>
References: <bug-58517-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-09/txt/msg00927.txt.bz2
Content-length: 562
https://gcc.gnu.org/bugzilla/show_bug.cgi?idX517
Oleg Endo <olegendo at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |kyrylo.tkachov at arm dot com
--- Comment #5 from Oleg Endo <olegendo at gcc dot gnu.org> ---
Kyrill, since you are currently working on ifcvt related things, could you
maybe have a look at this issue? I haven't checked it in a while, so I don't
know if it's still a problem.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libstdc++/66902] _S_debug_messages is unneccessary public
2015-07-17 2:18 [Bug libstdc++/66902] New: _S_debug_messages is unneccessary public persgray at gmail dot com
` (4 preceding siblings ...)
2015-09-11 10:38 ` redi at gcc dot gnu.org
@ 2015-09-11 11:13 ` persgray at gmail dot com
5 siblings, 0 replies; 7+ messages in thread
From: persgray at gmail dot com @ 2015-09-11 11:13 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66902
--- Comment #7 from Vadim Zhukov <persgray at gmail dot com> ---
(In reply to Jonathan Wakely from comment #6)
> 3.5 [basic.link]:
>
> -3- A name having namespace scope (3.3.6) has internal linkage if it is the
> name of
> — a variable, function or function template that is explicitly declared
> static; or,
> — a variable of non-volatile const-qualified type that is neither
> explicitly declared extern nor previously declared to have external
> linkage; or
> — a data member of an anonymous union.
>
> The first bullet applied when it was explicitly declared static and the
> second bullet applies now that it is a const-qualified type at namespace
> scope. In both cases it has internal linkage, so you should not see a global
> symbol and should not get the warning.
Sorry, I've missed that. Thank you for clarification.
>From gcc-bugs-return-496957-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri Sep 11 11:15:18 2015
Return-Path: <gcc-bugs-return-496957-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 104369 invoked by alias); 11 Sep 2015 11:15:18 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 104300 invoked by uid 48); 11 Sep 2015 11:15:15 -0000
From: "olegendo at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug rtl-optimization/58517] ifcvt (after combine) puts ccreg clobbering insn between ccset insn and ccreg use
Date: Fri, 11 Sep 2015 11:15:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: rtl-optimization
X-Bugzilla-Version: 4.9.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: olegendo at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-58517-4-FjDXbKXpCy@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-58517-4@http.gcc.gnu.org/bugzilla/>
References: <bug-58517-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-09/txt/msg00935.txt.bz2
Content-length: 420
https://gcc.gnu.org/bugzilla/show_bug.cgi?idX517
--- Comment #7 from Oleg Endo <olegendo at gcc dot gnu.org> ---
(In reply to ktkachov from comment #6)
> Huh, I wasn't aware of this BZ.
> This looks eerily similar to what I think is the root cause of PR 67481,
> which I'm working on now.
>
> After I'm done with PR 67481 it would be interesting to have a look whether
> they are indeed the same issue
OK, thanks!
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2015-09-11 11:13 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-17 2:18 [Bug libstdc++/66902] New: _S_debug_messages is unneccessary public persgray at gmail dot com
2015-07-17 9:13 ` [Bug libstdc++/66902] " redi at gcc dot gnu.org
2015-08-26 21:01 ` redi at gcc dot gnu.org
2015-09-03 19:05 ` redi at gcc dot gnu.org
2015-09-11 10:09 ` persgray at gmail dot com
2015-09-11 10:38 ` redi at gcc dot gnu.org
2015-09-11 11:13 ` persgray at gmail dot com
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).