This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/31780] [4.2/4.3 regression] ICE with incompatible types for ?: with "complex type" conversion
- From: "gdr at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 23 Dec 2007 21:22:28 -0000
- Subject: [Bug c++/31780] [4.2/4.3 regression] ICE with incompatible types for ?: with "complex type" conversion
- References: <bug-31780-1771@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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