summaryrefslogtreecommitdiff
path: root/lib/verify.h
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2025-10-18 19:06:52 +0200
committerJörg Frings-Fürst <debian@jff.email>2025-10-18 19:06:52 +0200
commit27dae84ed92f1ef0300263091972338d12e78348 (patch)
tree7c52931f474fafb8a4bd4fd15ca3461c77cdecc2 /lib/verify.h
parent4682deeb62247d34de87f8e777f99e2d337fd377 (diff)
New upstream version 1.4.1upstream/1.4.1upstream
Diffstat (limited to 'lib/verify.h')
-rw-r--r--lib/verify.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/lib/verify.h b/lib/verify.h
index 49a73c05..3b01d7c2 100644
--- a/lib/verify.h
+++ b/lib/verify.h
@@ -1,6 +1,6 @@
/* Compile-time assert-like macros.
- Copyright (C) 2005-2006, 2009-2024 Free Software Foundation, Inc.
+ Copyright (C) 2005-2006, 2009-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -157,9 +157,10 @@
#define _GL_CONCAT0(x, y) x##y
/* _GL_COUNTER is an integer, preferably one that changes each time we
- use it. Use __COUNTER__ if it works, falling back on __LINE__
- otherwise. __LINE__ isn't perfect, but it's better than a
- constant. */
+ use it. Use __COUNTER__ if it works (it does so with most compilers,
+ see <https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3457.htm>),
+ falling back on __LINE__ otherwise. __LINE__ isn't perfect, but it's
+ better than a constant. */
#if defined __COUNTER__ && __COUNTER__ != __COUNTER__
# define _GL_COUNTER __COUNTER__
#else
@@ -255,6 +256,11 @@ template <int w>
# endif
# endif
/* Define static_assert if needed. */
+# if defined __cplusplus && defined __clang__ && __clang_major__ < 9
+/* clang++ before commit 5c739665a8721228cf6143fd4ef95870a59f55ae had a
+ two-arguments static_assert but not the one-argument static_assert. */
+# undef static_assert
+# endif
# if (!defined static_assert \
&& __STDC_VERSION__ < 202311 \
&& (!defined __cplusplus \