From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3835 invoked by alias); 22 Jul 2010 11:04:07 -0000 Received: (qmail 2235 invoked by uid 48); 22 Jul 2010 11:03:48 -0000 Date: Thu, 22 Jul 2010 11:04:00 -0000 Message-ID: <20100722110348.2234.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug libstdc++/44952] #include implies global constructor. In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "jakub at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2010-07/txt/msg02351.txt.bz2 ------- Comment #11 from jakub at gcc dot gnu dot org 2010-07-22 11:03 ------- Perhaps with LTO we could special case this (perhaps using some special attribute) and only construct/destruct the first of these static ios_base::Init __ioinit; vars and optimize all the others away together with their construction/destruction, assuming they aren't otherwise referenced. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44952