This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/48760] [4.6 / 4.7 Regression (?)] std::complex constructor buggy in the face of NaN's


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...


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]