From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6329 invoked by alias); 22 Jan 2003 20:06:00 -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 6312 invoked by uid 71); 22 Jan 2003 20:06:00 -0000 Date: Wed, 22 Jan 2003 20:06:00 -0000 Message-ID: <20030122200600.6311.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Wolfgang Bangerth Subject: Re: c++/5305 Reply-To: Wolfgang Bangerth X-SW-Source: 2003-01/txt/msg01233.txt.bz2 List-Id: The following reply was made to PR c++/5305; it has been noted by GNATS. From: Wolfgang Bangerth To: gcc-gnats@gcc.gnu.org Cc: Subject: Re: c++/5305 Date: Wed, 22 Jan 2003 14:00:42 -0600 (CST) The problem continues to exist. Here's a simpler testcase: -------------------- struct DD { DD(int d); DD(const double d, const double e); }; // DD::DD(int) undefined DD::DD (const double d, const double e = 0.0) {} int main() { DD a = 0.0; } --------------------------------- We get a linker error since DD::DD(int) is undefined. It shouldn't be called, though. The problem goes away if the default argument is attach to the function declaration rather than definition, and also if the object is created via DD a(0.0); I don't know whether the two forms are actually equivalent. Will have to read up on this. W. ------------------------------------------------------------------------- Wolfgang Bangerth email: bangerth@ticam.utexas.edu www: http://www.ticam.utexas.edu/~bangerth/