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: "mark at codesourcery dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 Oct 2005 00:50:16 -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 #5 from mark at codesourcery dot com 2005-10-28 00:50 -------
Subject: Re: no static definition
pinskia at gcc dot gnu dot org wrote:
> ------- 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.
I understand it's a change. That's different from saying it's a regression.
>>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?
>
> cgraph is throwing things away when unit-at-a-time is enabled which is all the
> time with C++ in 4.0 and above.
Then, this bug should be changed to be a middle-end bug.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24561