From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8278 invoked by alias); 15 Jan 2003 15:01:30 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 8257 invoked by uid 61); 15 Jan 2003 15:01:29 -0000 Date: Wed, 15 Jan 2003 15:01:00 -0000 Message-ID: <20030115150129.8256.qmail@sources.redhat.com> To: gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, lecroart@nevrax.com, nobody@gcc.gnu.org From: bangerth@dealii.org Reply-To: bangerth@dealii.org, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, lecroart@nevrax.com, nobody@gcc.gnu.org, gcc-gnats@gcc.gnu.org Subject: Re: c++/9321: ctor not call in lib if a .cpp file doesn't have function called by the executable X-SW-Source: 2003-01/txt/msg00958.txt.bz2 List-Id: Synopsis: ctor not call in lib if a .cpp file doesn't have function called by the executable State-Changed-From-To: open->closed State-Changed-By: bangerth State-Changed-When: Wed Jan 15 07:01:29 2003 State-Changed-Why: Right, this is standard Unix linker behavior: object files that are not referenced from outside are discarded. The file in which you run your constructor is thus simply thrown away by the linker, which explains why the constructor is not run. W. http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9321