delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1998/10/23/08:54:06

From: khan AT xraylith DOT wisc DOT edu (Mumit Khan)
Subject: Re: GCC bug?
23 Oct 1998 08:54:06 -0700 :
Message-ID: <9810221459.AA20373.cygnus.gnu-win32@modi.xraylith.wisc.edu>
References: <362ee92d DOT 8199840 AT janus>
To: tjump AT cais DOT com
Cc: Tom Uban <uban AT mail DOT netnitco DOT net>, gnu-win32 AT cygnus DOT com

tjump AT cais DOT com (Theodore Jump) writes:
> 
> With EGCS 1.1 on Cygwin B19.1/CoolView DLL g++ chokes on it.
> 
> For reference, Microsoft Visual C++ 5 SP3 chokes also.
> 
> Intel C++ 3.0 does *not*.
> 
> I wonder what the 'spec' says, precisely, about this?

I thought it was a bug too, but I was mistaken.

Here's what Jason Merrill says quoting chapter and verse:

 -- using template mhl.format --
Date:    22 Oct 1998 03:30:07 PDT
To:      khan AT cygnus DOT com (Mumit Khan), egcs-bugs AT cygnus DOT com

From:    Jason Merrill <jason AT cygnus DOT com>
Subject: Re: egcs-1.1: C++ aggregate initialization bug?

>>>>> Mumit Khan <khan AT xraylith DOT wisc DOT edu> writes:

 >  I believe that egcs is incorrect in trying to use a copy constructor in
 >  the aggregate initialization below. According to Dec'96 DWP Sec 12.6.2.2 
 >  "Explicit Initialization", the initialization should only call test(int), 
 >  and not nomplain about non-public copy constructor. 

Nope.

  8.5 - Initializers [dcl.init]

  -12- The initialization that occurs in argument passing, function return,
  throwing an exception (except.throw), handling an exception
  (except.handle), and brace-enclosed initializer lists (dcl.init.aggr) is
  called copy-initialization and is equivalent to the form

       T x = a;

Jason


-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019