public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "bolero.murakami at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/57066] New: std::logb(-inf) returns wrong value Date: Thu, 25 Apr 2013 07:01:00 -0000 [thread overview] Message-ID: <bug-57066-4@http.gcc.gnu.org/bugzilla/> (raw) http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57066 Bug #: 57066 Summary: std::logb(-inf) returns wrong value Classification: Unclassified Product: gcc Version: 4.8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned@gcc.gnu.org ReportedBy: bolero.murakami@gmail.com auto inf = std::numeric_limits<double>::infinity(); std::cout << std::logb(-inf) << std::endl; "-inf" is output. it is wrong. std::logb(-inf) should returns +inf. > F.9.3.11 The logb functions > - logb(±∞) returns +∞. >From gcc-bugs-return-420917-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Apr 25 07:08:12 2013 Return-Path: <gcc-bugs-return-420917-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org> Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 23643 invoked by alias); 25 Apr 2013 07:08:12 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: <gcc-bugs.gcc.gnu.org> List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/> List-Post: <mailto:gcc-bugs@gcc.gnu.org> List-Help: <mailto:gcc-bugs-help@gcc.gnu.org> Sender: gcc-bugs-owner@gcc.gnu.org Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 23600 invoked by uid 48); 25 Apr 2013 07:08:08 -0000 From: "glisse at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/57064] [clarification requested] Which overload with ref-qualifier should be called? Date: Thu, 25 Apr 2013 07:08:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: glisse at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: <bug-57064-4-h8BYVt4czf@http.gcc.gnu.org/bugzilla/> In-Reply-To: <bug-57064-4@http.gcc.gnu.org/bugzilla/> References: <bug-57064-4@http.gcc.gnu.org/bugzilla/> X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 X-SW-Source: 2013-04/txt/msg02062.txt.bz2 Content-length: 1062 http://gcc.gnu.org/bugzilla/show_bug.cgi?idW064 --- Comment #7 from Marc Glisse <glisse at gcc dot gnu.org> 2013-04-25 07:08:07 UTC --- (In reply to comment #6) > void f(A &&a) > { > std::move(a).p(); > } > > _Z1fO1A: > .cfi_startproc > jmp _ZNR1A1pEv@PLT # > .cfi_endproc > > Then this looks like a bug in 4.8.1. Indeed, I get s/R/O/ with 4.9. > But then are we in agreement that a.p() in that function above should call the > lvalue-ref overload? Yes. > It does make the feature sligthly less useful for me. It > would require writing: > > return std::move(std::move(std::move(std::move(QString("%1 %2 %3 %4") > .arg(42)) > .arg(47)) > .arg(-42)) > .arg(-47)); Why? You are not naming those return values, so they are still rvalues and will use the && overload. (not sure why Qstring doesn't provide a mutating interface for arg)
next reply other threads:[~2013-04-25 7:01 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top 2013-04-25 7:01 bolero.murakami at gmail dot com [this message] 2013-04-25 8:05 ` [Bug c++/57066] [4.7/4.8/4.9 Regression] " rguenth at gcc dot gnu.org 2013-04-25 8:41 ` mpolacek at gcc dot gnu.org 2013-04-25 10:26 ` [Bug tree-optimization/57066] " mpolacek at gcc dot gnu.org 2013-04-25 11:47 ` mpolacek at gcc dot gnu.org 2013-04-25 13:43 ` mpolacek at gcc dot gnu.org 2013-04-25 15:52 ` mpolacek at gcc dot gnu.org 2013-04-25 15:52 ` mpolacek at gcc dot gnu.org 2013-05-03 8:55 ` [Bug tree-optimization/57066] [4.7/4.8 " mpolacek at gcc dot gnu.org 2013-05-03 8:59 ` mpolacek at gcc dot gnu.org 2013-05-03 8:59 ` mpolacek at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-57066-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).