http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48760
Paolo Carlini <paolo.carlini at oracle dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jsm28 at gcc dot gnu.org Component|libstdc++ |middle-end Summary|std::complex constructor |[4.6 / 4.7 Regression (?)] |buggy in the face of NaN's |std::complex constructor | |buggy in the face of NaN's Severity|blocker |normal --- Comment #1 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-04-25 12:07:44 UTC --- I don't think this is a library proper issue, how can it be? We have just: constexpr // In C++0x mode complex(float __r = 0.0f, float __i = 0.0f) : _M_value(__r + __i * 1.0fi) { } where _M_value is a __complex__ float. Joseph, can you have a look? By the way, what is reported did *not* happen in 4.5.x and nothing changed in the lib in this area in the meanwhile (besides the C++0x bits, not at issue here). Note a complete C++ snippet would be: #include <complex> #include <limits> #include <iostream> int main() { std::complex<float> c(0, std::numeric_limits<float>::quiet_NaN()); std::cout << c << std::endl; }