We need to include limits.h (or <climits>) in adaint.c because of LLONG_MIN.

Tested on x86-64/Linux, applied on the mainline.


2020-11-19  Eric Botcazou  <ebotca...@adacore.com>

        PR ada/97805
        * adaint.c: Include climits in C++ and limits.h otherwise.

-- 
Eric Botcazou
diff --git a/gcc/ada/adaint.c b/gcc/ada/adaint.c
index 560f3529442..f5432626ee6 100644
--- a/gcc/ada/adaint.c
+++ b/gcc/ada/adaint.c
@@ -145,6 +145,13 @@
 #include "version.h"
 #endif
 
+/* limits.h is needed for LLONG_MIN.  */
+#ifdef __cplusplus
+#include <climits>
+#else
+#include <limits.h>
+#endif
+
 #ifdef __cplusplus
 extern "C" {
 #endif

Reply via email to