GCC bug?
Mumit Khan
khan@xraylith.wisc.edu
Thu Oct 22 10:04:00 GMT 1998
tjump@cais.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@cygnus.com (Mumit Khan), egcs-bugs@cygnus.com
From: Jason Merrill <jason@cygnus.com>
Subject: Re: egcs-1.1: C++ aggregate initialization bug?
>>>>> Mumit Khan <khan@xraylith.wisc.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@cygnus.com" with one line of text: "help".
More information about the Cygwin
mailing list