This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/48760] [4.6 / 4.7 Regression (?)] std::complex constructor buggy in the face of NaN's
- From: "paolo.carlini at oracle dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 27 Apr 2011 01:30:45 +0000
- Subject: [Bug libstdc++/48760] [4.6 / 4.7 Regression (?)] std::complex constructor buggy in the face of NaN's
- Auto-submitted: auto-generated
- References: <bug-48760-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48760
--- Comment #19 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-04-27 01:26:43 UTC ---
Thus, if I understand correctly Gaby and Jason, we want to be able to
initialize a __complex__ float type *exactly* like an array of two floats?
Thus:
struct C
{
//float data[2];
__complex__ float data;
C(float r, float i)
: data{ r, i } { }
};
??
In my opinion, at this point at least, it would be safer and simpler to
restrict the syntax to C++1x, as part of the extended initializer lists
machinery and deal with the C++03 version of this PR separately (we can wa the
problem in the body, because the constructor isn't constexpr in that case).
Thus, any tip about the right bits of the C++ front-end to touch? Without, it
would take me a while to figure out, I'm afraid...