[flang] Fix issue#202 by avoiding clang+BSD/Darwin header bug
authorpeter klausler <pklausler@nvidia.com>
Wed, 10 Oct 2018 21:29:35 +0000 (14:29 -0700)
committerpeter klausler <pklausler@nvidia.com>
Wed, 10 Oct 2018 22:01:10 +0000 (15:01 -0700)
Original-commit: flang-compiler/f18@1bdefe528a8a72483c4a5a3b152db76ffc93e17c
Reviewed-on: https://github.com/flang-compiler/f18/pull/209
Tree-same-pre-rewrite: false

flang/lib/evaluate/integer.h
flang/lib/evaluate/real.h

index 3000f8d..2dee579 100644 (file)
 #include <string>
 #include <type_traits>
 
+// Some environments, viz. clang on Darwin, allow the macro HUGE
+// to leak out of <math.h> even when it is never directly included.
+#undef HUGE
+
 namespace Fortran::evaluate::value {
 
 // Implements an integer as an assembly of smaller host integer parts
index b291afe..9034462 100644 (file)
 #include <limits>
 #include <string>
 
+// Some environments, viz. clang on Darwin, allow the macro HUGE
+// to leak out of <math.h> even when it is never directly included.
+#undef HUGE
+
 namespace Fortran::evaluate::value {
 
 // Models IEEE binary floating-point numbers (IEEE 754-2008,