This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/22355] Multiple local static variables initialization: missed optimization opportunity
- From: "yuri at Magma-DA dot COM" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 7 Jul 2005 21:21:12 -0000
- Subject: [Bug c++/22355] Multiple local static variables initialization: missed optimization opportunity
- References: <20050707202900.22355.yuri@tsoft.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From yuri at Magma-DA dot COM 2005-07-07 21:21 -------
Subject: Re: Multiple local static variables initialization:
missed optimization opportunity
I agree, this situation is fuzzy and bug is probably invalid.
But there are actually local static initializations that are to blame.
Why should these be checked/initialized on entry into the function, not
globally?
Any particular benefit of this ?
I think it would have been way cleaner if initializations were done
globally when code is loaded.
Yuri
pinskia at gcc dot gnu dot org wrote:
>------- Additional Comments From pinskia at gcc dot gnu dot org 2005-07-07 20:39 -------
>Say we call f() again before finish initializing i. then we call the get statement, it just undefined?
>
>
>
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22355