public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/58625] New: std::signbit always converts to double
@ 2013-10-04 21:26 olegendo at gcc dot gnu.org
  2013-10-04 22:58 ` [Bug libstdc++/58625] " paolo.carlini at oracle dot com
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: olegendo at gcc dot gnu.org @ 2013-10-04 21:26 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58625

            Bug ID: 58625
           Summary: std::signbit always converts to double
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: olegendo at gcc dot gnu.org

In file libstdc++-v4/include/c_global:

  constexpr bool
  signbit(float __x)
  { return __builtin_signbit(__x); }

  constexpr bool
  signbit(double __x)
  { return __builtin_signbit(__x); }

  constexpr bool
  signbit(long double __x)
  { return __builtin_signbit(__x); }


I believe this is supposed to be:

  constexpr bool
  signbit(float __x)
  { return __builtin_signbitf(__x); }

  constexpr bool
  signbit(double __x)
  { return __builtin_signbit(__x); }

  constexpr bool
  signbit(long double __x)
  { return __builtin_signbitl(__x); }

As it is right now, std::signbit always does a conversion to double.


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2015-03-16 22:00 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-04 21:26 [Bug libstdc++/58625] New: std::signbit always converts to double olegendo at gcc dot gnu.org
2013-10-04 22:58 ` [Bug libstdc++/58625] " paolo.carlini at oracle dot com
2013-10-04 23:42 ` paolo.carlini at oracle dot com
2013-10-04 23:43 ` pinskia at gcc dot gnu.org
2013-10-05  8:28 ` jakub at gcc dot gnu.org
2013-10-05  8:42 ` olegendo at gcc dot gnu.org
2013-10-05 10:41 ` jakub at gcc dot gnu.org
2013-10-05 10:52 ` jakub at gcc dot gnu.org
2013-10-05 12:00 ` paolo.carlini at oracle dot com
2013-10-05 12:10 ` daniel.kruegler at googlemail dot com
2013-10-05 12:25 ` paolo.carlini at oracle dot com
2013-10-06 13:44 ` paolo at gcc dot gnu.org
2013-10-06 13:45 ` paolo.carlini at oracle dot com
2015-03-15 21:09 ` tijl at coosemans dot org
2015-03-16 22:00 ` joseph at codesourcery dot com

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).