diff mbox series

Fix PR ada/97805

Message ID 2422106.cirsiXLexI@fomalhaut
State New
Headers show
Series Fix PR ada/97805 | expand

Commit Message

Eric Botcazou Nov. 19, 2020, 3:41 p.m. UTC
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  <ebotcazou@adacore.com>

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

Patch

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