From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28694 invoked by alias); 23 Sep 2012 21:38:15 -0000 Received: (qmail 28564 invoked by uid 48); 23 Sep 2012 21:37:54 -0000 From: "glisse at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/54686] std::abs (long long) resorts to std::abs (double) if llabs is absent Date: Sun, 23 Sep 2012 21:38:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: glisse at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: 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 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: 2012-09/txt/msg01873.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54686 --- Comment #10 from Marc Glisse 2012-09-23 21:37:54 UTC --- (In reply to comment #8) > Thanks god (or whoever) Would that make me a half-god? seems dangerous... > that the following: > > unsigned int test_xx (unsigned int a) > { > return std::abs (a); > } > > ends up as a nop. *phew*. Try it with long (or long long) instead of int now...