public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "olegendo at gcc dot gnu.org" <gcc-bugzilla@gcc.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:51:00 -0000 [thread overview]
Message-ID: <bug-54686-4-VFZdOSKCWB@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-54686-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54686
--- Comment #11 from Oleg Endo <olegendo at gcc dot gnu.org> 2012-09-23 21:50:37 UTC ---
(In reply to comment #10)
> (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...
You really scared me now.
unsigned long is also a nop.
unsigned short is also a nop.
unsigned char is also a nop.
*drumroll*
bool bleh (bool x)
{
return std::abs (x);
}
gets a fine floating treatment -- it is converted to double and then tested for
!= 0.0.
next prev parent reply other threads:[~2012-09-23 21:51 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-23 20:21 [Bug libstdc++/54686] New: " olegendo at gcc dot gnu.org
2012-09-23 20:42 ` [Bug target/54686] " paolo.carlini at oracle dot com
2012-09-23 20:43 ` paolo.carlini at oracle dot com
2012-09-23 20:49 ` paolo.carlini at oracle dot com
2012-09-23 20:57 ` paolo.carlini at oracle dot com
2012-09-23 21:00 ` glisse at gcc dot gnu.org
2012-09-23 21:14 ` olegendo at gcc dot gnu.org
2012-09-23 21:15 ` paolo.carlini at oracle dot com
2012-09-23 21:21 ` olegendo at gcc dot gnu.org
2012-09-23 21:21 ` paolo.carlini at oracle dot com
2012-09-23 21:38 ` glisse at gcc dot gnu.org
2012-09-23 21:51 ` olegendo at gcc dot gnu.org [this message]
2012-09-23 22:11 ` glisse at gcc dot gnu.org
2012-09-23 22:22 ` glisse at gcc dot gnu.org
2012-09-23 22:34 ` olegendo at gcc dot gnu.org
2012-09-23 22:43 ` paolo.carlini at oracle dot com
2012-09-23 22:53 ` paolo.carlini at oracle dot com
2012-09-23 22:55 ` glisse at gcc dot gnu.org
2012-09-23 23:02 ` glisse at gcc dot gnu.org
2012-09-23 23:04 ` paolo.carlini at oracle dot com
2012-09-23 23:05 ` olegendo at gcc dot gnu.org
2012-09-23 23:06 ` paolo.carlini at oracle dot com
2012-09-23 23:09 ` glisse at gcc dot gnu.org
2012-09-23 23:12 ` paolo.carlini at oracle dot com
2012-09-23 23:16 ` glisse at gcc dot gnu.org
2012-09-23 23:18 ` paolo.carlini at oracle dot com
2012-09-24 0:16 ` kkojima at gcc dot gnu.org
2012-09-24 5:33 ` glisse at gcc dot gnu.org
2012-09-24 9:27 ` paolo.carlini at oracle dot com
2012-09-30 17:48 ` olegendo at gcc dot gnu.org
2012-09-30 18:18 ` paolo.carlini at oracle dot com
2012-10-04 22:27 ` glisse at gcc dot gnu.org
2012-10-05 16:21 ` glisse at gcc dot gnu.org
2012-10-05 16:24 ` glisse at gcc dot gnu.org
2012-10-05 16:25 ` paolo.carlini at oracle dot com
2012-10-05 16:34 ` glisse at gcc dot gnu.org
2012-10-05 16:39 ` paolo.carlini at oracle dot com
2012-10-05 16:47 ` glisse at gcc dot gnu.org
2012-10-05 16:58 ` paolo.carlini at oracle dot com
2012-10-05 17:02 ` paolo.carlini at oracle dot com
2012-10-05 17:04 ` glisse at gcc dot gnu.org
2012-10-05 17:09 ` paolo.carlini at oracle dot com
2012-10-05 19:10 ` glisse 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-54686-4-VFZdOSKCWB@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: link
Be 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).