summaryrefslogtreecommitdiff
path: root/lib/verify.h
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2025-10-18 19:07:08 +0200
committerJörg Frings-Fürst <debian@jff.email>2025-10-18 19:07:08 +0200
commit693ae7b71dfdd1a8146266b5794a71c0dbe5dff0 (patch)
tree9704e2f7bd8962ea8911cd6f4e2d37227d7eff2e /lib/verify.h
parentb8b9b0ac61ac47dddc58717f23619f8b06640498 (diff)
parent27dae84ed92f1ef0300263091972338d12e78348 (diff)
Update upstream source from tag 'upstream/1.4.1'
Update to upstream version '1.4.1' with Debian dir 8add41ffbfe3e6636eec0ec134c5af96832cc143
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 \