[Bug math/22700] New: typedef logic for _Float128 in bits/floatn.h only supports gcc

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug math/22700] New: typedef logic for _Float128 in bits/floatn.h only supports gcc

maiku.fabian at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=22700

            Bug ID: 22700
           Summary: typedef logic for _Float128 in bits/floatn.h only
                    supports gcc
           Product: glibc
           Version: 2.27
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: math
          Assignee: unassigned at sourceware dot org
          Reporter: nszabolcs at gmail dot com
  Target Milestone: ---

on targets where long double has the right semantics the
public math header may typedef _Float128 even if the
compiler has its own _Float128 definition.

use

#if !defined __FLT128_MANT_DIG__ || defined __cplusplus

instead of

#if !__GNUC_PREREQ (7, 0) || defined __cplusplus

to check if compiler lacks _Float128 support since it
works for both gcc and clang.

clang trunk supports _Float128 since

https://reviews.llvm.org/D40673

but they don't seem to support the f128 constant suffix
(only q) nor the __builtin_inff128 etc builtins so a bit
more change is required to make the headers work with it,
and it's not clear how to check for those features
(other than ifdef __clang__), however changing the headers
to be able to work with other compilers is useful anyway.

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug math/22700] typedef logic for _Float128 in bits/floatn.h only supports gcc

maiku.fabian at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=22700

Tulio Magno Quites Machado Filho <tuliom at linux dot vnet.ibm.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tuliom at linux dot vnet.ibm.com

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug math/22700] typedef logic for _Float128 in bits/floatn.h only supports gcc

maiku.fabian at gmail dot com
In reply to this post by maiku.fabian at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=22700

mib.bugzilla at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mib.bugzilla at gmail dot com

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug math/22700] typedef logic for _Float128 in bits/floatn.h only supports gcc

maiku.fabian at gmail dot com
In reply to this post by maiku.fabian at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=22700

Stan Shebs <stanshebs at earthlink dot net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |stanshebs at earthlink dot net

--- Comment #1 from Stan Shebs <stanshebs at earthlink dot net> ---
FYI, f128 intrinsics were added a few days ago:

https://reviews.llvm.org/rL321948

(Conversions are still lacking though.)

At some point it might make sense to have a prereq macro that checks
__clang_major__ and __clang_minor__.

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug math/22700] typedef logic for _Float128 in bits/floatn.h only supports gcc

maiku.fabian at gmail dot com
In reply to this post by maiku.fabian at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=22700

--- Comment #2 from Szabolcs Nagy <nszabolcs at gmail dot com> ---
clang reverted the _Float128 definition for now:
https://github.com/llvm-mirror/clang/commit/2b1d36bee69eaf8897af89d53630804f9f66badd

--
You are receiving this mail because:
You are on the CC list for the bug.