summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2020-08-09 15:01:23 +0200
committerBruno Haible <bruno@clisp.org>2020-08-09 15:01:23 +0200
commit31f9476c9ec08b0a21a71fce807fc72fef0c6441 (patch)
tree4ce0a08f98c0a26a52f371f21b85f0fc369812c1 /m4
parent94e462dba2d39c73858d855d528f2d86253de498 (diff)
downloadgnulib-31f9476c9ec08b0a21a71fce807fc72fef0c6441.tar.gz
Use __typeof__ with clang.
* m4/stdint.m4 (gl_STDINT_H): Check for SIZE_MAX also on "clang -std=gnu99". * lib/intprops.h (_GL_HAVE___TYPEOF__): Define to 1 also on clang. * tests/test-stdint.c (verify_same_types): Enable the check also on clang.
Diffstat (limited to 'm4')
-rw-r--r--m4/stdint.m44
1 files changed, 2 insertions, 2 deletions
diff --git a/m4/stdint.m4 b/m4/stdint.m4
index 29ad826d8e..e0fa8a51fb 100644
--- a/m4/stdint.m4
+++ b/m4/stdint.m4
@@ -1,4 +1,4 @@
-# stdint.m4 serial 54
+# stdint.m4 serial 55
dnl Copyright (C) 2001-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -152,7 +152,7 @@ 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__ \
+#elif (2 <= __GNUC__ || 4 <= __clang_major__ || defined __IBM__TYPEOF__ \
|| (0x5110 <= __SUNPRO_C && !__STDC__))
extern size_t k;
extern __typeof__ (SIZE_MAX) k;