diff options
author | Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> | 2022-11-02 10:52:59 +0100 |
---|---|---|
committer | Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> | 2022-11-02 10:52:59 +0100 |
commit | c3299cde4f33121f82a7a25d10c152ac96d2b035 (patch) | |
tree | 84d98049003a7f570675ae9b93e7f2ad678a4e89 /gcc/gcc.cc | |
parent | b65e391da94476fbc5c8947c81af61aa74941dc8 (diff) | |
download | gcc-c3299cde4f33121f82a7a25d10c152ac96d2b035.zip gcc-c3299cde4f33121f82a7a25d10c152ac96d2b035.tar.gz gcc-c3299cde4f33121f82a7a25d10c152ac96d2b035.tar.bz2 |
builtins: Guard builtins.cc against HUGE_VAL and NAN definitions
trunk bootstrap recently broke on Solaris like this:
/vol/gcc/src/hg/master/local/gcc/builtins.cc:2104:8: error: pasting
"CFN_BUILT_IN_" and "(" does not give a valid preprocessing token
2104 | case CFN_BUILT_IN_##MATHFN: \
| ^~~~~~~~~~~~~
/vol/gcc/src/hg/master/local/gcc/builtins.cc:2112:3: note: in expansion of
macro 'CASE_MATHFN'
2112 | CASE_MATHFN(MATHFN) \
| ^~~~~~~~~~~
/vol/gcc/src/hg/master/local/gcc/builtins.cc:1967:5: note: in expansion of macro 'CASE_MATHFN_FLOATN'
1967 | CASE_MATHFN_FLOATN (HUGE_VAL) \
and similarly for NAN.
It turns out this happens because <math.h> is included at some point,
which (in <iso/math_c99.h>) defines
While this only happpens on Solaris right now, the same issue would be
present on other targets when <math.h> gets included somehow.
To avoid this, this patch #undef's both macros.
Bootstrapped without regressions on i386-pc-solaris2.11 and
sparc-sun-solaris2.11.
2022-11-01 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
gcc:
* builtins.cc (mathfn_built_in_2): #undef HUGE_VAL, NAN.
Diffstat (limited to 'gcc/gcc.cc')
0 files changed, 0 insertions, 0 deletions