gomp-constants.h is also included by compiler sources such as
builtins.cc and c-family/c-omp.cc, which are built with the host
compiler. That compiler need not predefine __INT8_MAX__.
Bootstrapped and regression-tested on x86_64-pc-linux-gnu
(default languages, --disable-multilib), with no new regressions
relative to the unmodified baseline.
Also tested with a non-GCC, EDG-based host compiler (GNU extensions
disabled) on a non-glibc platform, where the patch resolves a build
failure.
include/ChangeLog:
* gomp-constants.h (GOMP_INTEROP_IFR_SEPARATOR)
(GOMP_INTEROP_IFR_UNKNOWN): Do not use __INT8_MAX__.
Signed-off-by: Shiva <[email protected]>
---
include/gomp-constants.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/gomp-constants.h b/include/gomp-constants.h
index 8662872de7c..3d14fe39f95 100644
--- a/include/gomp-constants.h
+++ b/include/gomp-constants.h
@@ -425,8 +425,8 @@ enum gomp_map_kind
/* Interop foreign-runtime data;
OpenMP defines positive values; reserve 0 and negative for GCC. */
#define GOMP_INTEROP_IFR_LAST 7
-#define GOMP_INTEROP_IFR_SEPARATOR ((char)(-__INT8_MAX__-1))
-#define GOMP_INTEROP_IFR_UNKNOWN ((char)(-__INT8_MAX__))
+#define GOMP_INTEROP_IFR_SEPARATOR ((char)(-127-1))
+#define GOMP_INTEROP_IFR_UNKNOWN ((char)(-127))
/* GOMP_interop target_targetsync argument. */
#define GOMP_INTEROP_TARGET (1 << 0)