Skip to content

Commit f95710c

Browse files
authored
[flang] Fixed compiler build on glibc 2.17 systems after 3149c93. (llvm#84873)
1 parent e89b4bc commit f95710c

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

flang/include/flang/Evaluate/integer.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@
2727
#include <string>
2828
#include <type_traits>
2929

30+
// Some environments, viz. glibc 2.17, allow the macro HUGE
31+
// to leak out of <math.h>.
32+
#undef HUGE
33+
3034
namespace Fortran::evaluate::value {
3135

3236
// Implements an integer as an assembly of smaller host integer parts

flang/include/flang/Evaluate/real.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@
1818
#include <limits>
1919
#include <string>
2020

21+
// Some environments, viz. glibc 2.17, allow the macro HUGE
22+
// to leak out of <math.h>.
23+
#undef HUGE
24+
2125
namespace llvm {
2226
class raw_ostream;
2327
}

flang/lib/Evaluate/fold-implementation.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@
3939
#include <type_traits>
4040
#include <variant>
4141

42+
// Some environments, viz. glibc 2.17, allow the macro HUGE
43+
// to leak out of <math.h>.
44+
#undef HUGE
45+
4246
namespace Fortran::evaluate {
4347

4448
// Utilities

0 commit comments

Comments
 (0)