Subject: Re: GCC bug?
From: [email-masked] (Mumit Khan)

23 Oct 1998 08:54:06 -0700
Message-ID: <[email-masked]>
References: <362ee92d.8199840@janus>
To: [email-masked]
Cc: Tom Uban <[email-masked]>, [email-masked]

[email-masked] (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:      [email-masked] (Mumit Khan), [email-masked]

From:    Jason Merrill <[email-masked]>
Subject: Re: egcs-1.1: C++ aggregate initialization bug?

>>>>> Mumit Khan <[email-masked]> 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
"[email-masked]" with one line of text: "help".