A new alpha bug
Jason Merrill
jason@cygnus.com
Fri Sep 12 19:10:00 GMT 1997
>>>>> H J Lu <hjl@lucon.org> writes:
>> > complex_double (double r = 0, double i = 0): re (r), im (i) { }
>> [...]
>> > complex_double one = 1.0;
>>
>> I don't think this does what you think it does. What it doesn't
>> do is call the constructor listed.
Yes, it does.
> complex_double one = 1.0;
> should be translate by compiler to
> complex_double one;
> complex_double tmp (1.0);
> one = tmp;
Not quite. More like
complex_double tmp (1.0, 0);
complex_double one (tmp);
The '=' in a declaration does not indicate use of the assignment operator.
Jason
More information about the Gcc
mailing list