public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/5305
@ 2003-01-22 20:06 Wolfgang Bangerth
  0 siblings, 0 replies; 2+ messages in thread
From: Wolfgang Bangerth @ 2003-01-22 20:06 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR c++/5305; it has been noted by GNATS.

From: Wolfgang Bangerth <bangerth@ticam.utexas.edu>
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/
 
 


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: c++/5305
@ 2003-01-22 20:16 Wolfgang Bangerth
  0 siblings, 0 replies; 2+ messages in thread
From: Wolfgang Bangerth @ 2003-01-22 20:16 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR c++/5305; it has been noted by GNATS.

From: Wolfgang Bangerth <bangerth@ticam.utexas.edu>
To: gcc-gnats@gcc.gnu.org
Cc:  
Subject: Re: c++/5305
Date: Wed, 22 Jan 2003 14:10:14 -0600 (CST)

 > 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.
 
 12.3.1.1 has an example that says that 
   DD a = 0.0;
 should here indeed call the two-parameter constructor.
 
 W.
 
 -------------------------------------------------------------------------
 Wolfgang Bangerth             email:            bangerth@ticam.utexas.edu
                               www: http://www.ticam.utexas.edu/~bangerth/
 
 


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-01-22 20:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-01-22 20:06 c++/5305 Wolfgang Bangerth
2003-01-22 20:16 c++/5305 Wolfgang Bangerth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).