From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12215 invoked by alias); 7 Jul 2005 21:21:19 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 12168 invoked by alias); 7 Jul 2005 21:21:12 -0000 Date: Thu, 07 Jul 2005 21:21:00 -0000 Message-ID: <20050707212112.12167.qmail@sourceware.org> From: "yuri at Magma-DA dot COM" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20050707202900.22355.yuri@tsoft.com> References: <20050707202900.22355.yuri@tsoft.com> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c++/22355] Multiple local static variables initialization: missed optimization opportunity X-Bugzilla-Reason: CC X-SW-Source: 2005-07/txt/msg00817.txt.bz2 List-Id: ------- 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