From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19222 invoked by alias); 25 Apr 2011 17:58:53 -0000 Received: (qmail 19210 invoked by uid 22791); 25 Apr 2011 17:58:53 -0000 X-SWARE-Spam-Status: No, hits=-2.7 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 25 Apr 2011 17:58:39 +0000 From: "gdr at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/48760] [4.6 / 4.7 Regression (?)] std::complex constructor buggy in the face of NaN's X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: gdr at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: paolo.carlini at oracle dot com X-Bugzilla-Target-Milestone: 4.6.1 X-Bugzilla-Changed-Fields: CC Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Mon, 25 Apr 2011 17:58:00 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2011-04/txt/msg02538.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48760 Gabriel Dos Reis changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |gdr at gcc dot gnu.org --- Comment #8 from Gabriel Dos Reis 2011-04-25 17:57:15 UTC --- (In reply to comment #1) > 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) { } I believe we need a compiler support to construct a complex value from its independent components -- instead of the low-level C-style assignments that we are currently forced to do (or use multiplication.) I think that is the way to go. -- Gaby