bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 1/2] verify: port to pedantic gcc -std=c99


From: Paul Eggert
Subject: [PATCH 1/2] verify: port to pedantic gcc -std=c99
Date: Tue, 19 Apr 2022 18:24:44 -0700

* lib/verify.h (_GL_VERIFY): If we lack both _Static_assert and
static_assert, suppress -Wnexted-externs.
---
 ChangeLog    | 4 ++++
 lib/verify.h | 3 +++
 2 files changed, 7 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index 9bab736be4..c2509b8387 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2022-04-19  Paul Eggert  <eggert@cs.ucla.edu>
 
+       verify: port to pedantic gcc -std=c99
+       * lib/verify.h (_GL_VERIFY): If we lack both _Static_assert and
+       static_assert, suppress -Wnexted-externs.
+
        gettime-res: add tests
        * modules/gettime-res-tests, tests/test-gettime-res.c: New files.
 
diff --git a/lib/verify.h b/lib/verify.h
index c2d2a56670..c5c63ae97c 100644
--- a/lib/verify.h
+++ b/lib/verify.h
@@ -215,6 +215,9 @@ template <int w>
 # define _GL_VERIFY(R, DIAGNOSTIC, ...)                                \
     extern int (*_GL_GENSYM (_gl_verify_function) (void))             \
       [_GL_VERIFY_TRUE (R, DIAGNOSTIC)]
+# if 4 < __GNUC__ + (6 <= __GNUC_MINOR__)
+#  pragma GCC diagnostic ignored "-Wnested-externs"
+# endif
 #endif
 
 /* _GL_STATIC_ASSERT_H is defined if this code is copied into assert.h.  */
-- 
2.35.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]