This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/24561] no static definition
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 Oct 2005 00:24:30 -0000
- Subject: [Bug c++/24561] no static definition
- References: <bug-24561-365@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #4 from pinskia at gcc dot gnu dot org 2005-10-28 00:24 -------
(In reply to comment #3)
> I wouldn't call this a regression; I don't think there's any guarantee that
> unused statics stay around, even with -O0.
It is a regression as turning on unit-at-a-time at -O0 changed it.
> However, I tend to agree that it would be better if they did stay around at
> -O0. In other words, I wouldn't be opposed to adding such a guarantee.
> Do we know if this is a front-end problem or a cgraph problem?
I think this is a cgraph issue but that is only because nobody thought unit
at a time would be enabled at -O0 when it was first made.
> Is cgraph
> throwing stuff away at -O0, or are we not telling cgraph about the variable?
cgraph is throwing things away when unit-at-a-time is enabled which is all the
time with C++ in 4.0 and above.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24561