aboutsummaryrefslogtreecommitdiff
path: root/gdb/gnulib/import/m4/stdint.m4
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/gnulib/import/m4/stdint.m4')
-rw-r--r--gdb/gnulib/import/m4/stdint.m411
1 files changed, 10 insertions, 1 deletions
diff --git a/gdb/gnulib/import/m4/stdint.m4 b/gdb/gnulib/import/m4/stdint.m4
index fa6f103..05b6ab7 100644
--- a/gdb/gnulib/import/m4/stdint.m4
+++ b/gdb/gnulib/import/m4/stdint.m4
@@ -1,4 +1,4 @@
-# stdint.m4 serial 47
+# stdint.m4 serial 48
dnl Copyright (C) 2001-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -154,6 +154,15 @@ uintptr_t h = UINTPTR_MAX;
intmax_t i = INTMAX_MAX;
uintmax_t j = UINTMAX_MAX;
+/* Check that SIZE_MAX has the correct type, if possible. */
+#if 201112 <= __STDC_VERSION__
+int k = _Generic (SIZE_MAX, size_t: 0);
+#elif (2 <= __GNUC__ || defined __IBM__TYPEOF__ \
+ || (0x5110 <= __SUNPRO_C && !__STDC__))
+extern size_t k;
+extern __typeof__ (SIZE_MAX) k;
+#endif
+
#include <limits.h> /* for CHAR_BIT */
#define TYPE_MINIMUM(t) \
((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))