public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/21139] New: Improve handling of function-scope statics on platforms without weak symbols
@ 2005-04-21 3:32 mmitchel at gcc dot gnu dot org
2005-04-25 4:18 ` [Bug c++/21139] " pinskia at gcc dot gnu dot org
0 siblings, 1 reply; 2+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-04-21 3:32 UTC (permalink / raw)
To: gcc-bugs
On platforms without weak symbols, we presently emit statically initialized
function-scope static variables with internal linkage, even in functions with
vague linkage, and issue a warning indicating that, while the standard requires
that there be only one copy of the variable, there will in fact be multiple
copies in the user program.
In this thread:
http://gcc.gnu.org/ml/libstdc++/2005-04/msg00152.html
it was agreed that we should instead dynamically initialized all non-const
variables (thereby ensuring correct semantics), and continue to emit static
initializers only for const variables. For const variables whose addresses are
not taken, we should not warn, as there is no way for the program to tell that
there are multiple copies of the variable.
--
Summary: Improve handling of function-scope statics on platforms
without weak symbols
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Severity: enhancement
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: mmitchel at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21139
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug c++/21139] Improve handling of function-scope statics on platforms without weak symbols
2005-04-21 3:32 [Bug c++/21139] New: Improve handling of function-scope statics on platforms without weak symbols mmitchel at gcc dot gnu dot org
@ 2005-04-25 4:18 ` pinskia at gcc dot gnu dot org
0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-04-25 4:18 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-04-25 04:18 -------
Confirmed.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2005-04-25 04:18:12
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21139
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-04-25 4:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-04-21 3:32 [Bug c++/21139] New: Improve handling of function-scope statics on platforms without weak symbols mmitchel at gcc dot gnu dot org
2005-04-25 4:18 ` [Bug c++/21139] " pinskia at gcc dot gnu dot org
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).