Ensure that the _Generic() macro in math.h works with qualified types.
tgmath.h contains the same bugs and so should be fixed in the same way.
This commit is contained in:
parent
0c919b730c
commit
e21be487d3
@ -86,7 +86,16 @@ extern const union __nan_un {
|
||||
#define __fp_type_select(x, f, d, ld) _Generic((x), \
|
||||
float: f(x), \
|
||||
double: d(x), \
|
||||
long double: ld(x))
|
||||
long double: ld(x), \
|
||||
volatile float: f(x), \
|
||||
volatile double: d(x), \
|
||||
volatile long double: ld(x), \
|
||||
volatile const float: f(x), \
|
||||
volatile const double: d(x), \
|
||||
volatile const long double: ld(x), \
|
||||
const float: f(x), \
|
||||
const double: d(x), \
|
||||
const long double: ld(x))
|
||||
#elif __GNUC_PREREQ__(3, 1) && !defined(__cplusplus)
|
||||
#define __fp_type_select(x, f, d, ld) __builtin_choose_expr( \
|
||||
__builtin_types_compatible_p(__typeof(x), long double), ld(x), \
|
||||
@ -189,21 +198,21 @@ int __signbitf(float) __pure2;
|
||||
int __signbitl(long double) __pure2;
|
||||
|
||||
static __inline int
|
||||
__inline_isnan(double __x)
|
||||
__inline_isnan(__const double __x)
|
||||
{
|
||||
|
||||
return (__x != __x);
|
||||
}
|
||||
|
||||
static __inline int
|
||||
__inline_isnanf(float __x)
|
||||
__inline_isnanf(__const float __x)
|
||||
{
|
||||
|
||||
return (__x != __x);
|
||||
}
|
||||
|
||||
static __inline int
|
||||
__inline_isnanl(long double __x)
|
||||
__inline_isnanl(__const long double __x)
|
||||
{
|
||||
|
||||
return (__x != __x);
|
||||
|
Loading…
Reference in New Issue
Block a user