[Bug c++/31780] [4.2/4.3 regression] ICE with incompatible types for ?: with "complex type" conversion
gdr at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Sun Dec 23 21:22:00 GMT 2007
------- Comment #17 from gdr at gcc dot gnu dot org 2007-12-23 21:22 -------
(In reply to comment #13)
> Gaby --
>
> Paolo and I would like your input on this issue, please.
>
> Thanks,
>
> -- Mark
>
Sorry for replying late -- this issue escaped by attention; Paolo
kindly sent me a private reminder.
The std::complex<double> constructor taking a __complex__ double exists
primarily so that we can have a simple implementation of std::complex<double>
that is both compatible with C99 _Complex and the GNU extension __complex__,
and beneficiary of the existing machinery supporting that datatype.
I believe that is a plus we all agree we should keep.
I'm very nervous about adding more constructors.
I'd rather distinguish the constructor taking __complex__ by adding
a dummy parameter:
enum _DummyArg { };
complex(__complex__ double __z, _DummyArg);
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31780
More information about the Gcc-bugs
mailing list