From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29206 invoked by alias); 7 Jul 2010 09:30:48 -0000 Received: (qmail 29163 invoked by alias); 7 Jul 2010 09:30:33 -0000 Date: Wed, 07 Jul 2010 09:30:00 -0000 Message-ID: <20100707093033.29162.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug c++/44855] Static members not initialised in explicit template instances of library In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "hlprasu at gmail dot com" 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/msg00698.txt.bz2 ------- Comment #3 from hlprasu at gmail dot com 2010-07-07 09:30 ------- Subject: Re: Static members not initialised in explicit template instances of library But, as I know, no where is it mentioned to be necessary for static member initialisation. Why should the compiler allow for such a subtle error? Or is this documented somewhere? Besides this issue, I've not faced any other problem in using shared library by not using -fPIC. Could you please point out the necessary implications that I am missing here? On 7 July 2010 14:48, redi at gcc dot gnu dot org wrote: > > > ------- Comment #2 from redi at gcc dot gnu dot org  2010-07-07 09:18 ------- > You need to use -fPIC for a shared object, so the version without that is not > valid. > > -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44855