diff options
author | Aldy Hernandez <aldyh@redhat.com> | 2022-08-20 12:41:53 +0200 |
---|---|---|
committer | Aldy Hernandez <aldyh@redhat.com> | 2022-08-26 20:45:30 +0200 |
commit | 33cae277637d569d66518b6805a84444b8d66e9c (patch) | |
tree | d42ce9f13b3e3be9f35d73776a7fd5eb2d38bfed /libgcc/enable-execute-stack-mprotect.c | |
parent | 0abb78dda084a14b3d955757c6431fff71c263f3 (diff) | |
download | gcc-33cae277637d569d66518b6805a84444b8d66e9c.zip gcc-33cae277637d569d66518b6805a84444b8d66e9c.tar.gz gcc-33cae277637d569d66518b6805a84444b8d66e9c.tar.bz2 |
Add set/get functions for negative infinity in real.*
For the frange implementation with endpoints I'm about to contribute,
we need to set REAL_VALUE_TYPEs with negative infinity. The support
is already there in real.cc, but it is awkward to get at. One could
call real_inf() and then negate the value, but I've added the ability
to pass the sign argument like many of the existing real.* functions.
I've declared the functions in such a way to avoid changes to the
existing code base:
// Unchanged function returning true for either +-INF.
bool real_isinf (const REAL_VALUE_TYPE *r);
// New overload to be able to specify the sign.
bool real_isinf (const REAL_VALUE_TYPE *r, int sign);
// Replacement function for setting INF, defaults to +INF.
void real_inf (REAL_VALUE_TYPE *, int sign = 0);
gcc/ChangeLog:
* real.cc (real_isinf): New overload.
(real_inf): Add sign argument.
* real.h (real_isinf): New overload.
(real_inf): Add sign argument.
Diffstat (limited to 'libgcc/enable-execute-stack-mprotect.c')
0 files changed, 0 insertions, 0 deletions