]> Savannah Git Hosting - gnulib.git/commitdiff
ialloc, gethrxtime: Restore GCC diagnostics options.
authorBruno Haible <bruno@clisp.org>
Thu, 13 Apr 2023 12:26:50 +0000 (14:26 +0200)
committerBruno Haible <bruno@clisp.org>
Thu, 13 Apr 2023 12:26:50 +0000 (14:26 +0200)
* lib/ialloc.h: Invoke _GL_INLINE_HEADER_END.
* lib/xtime.h: Likewise.
* Makefile (sc_check_GL_INLINE_HEADER_use): New rule.

ChangeLog
Makefile
lib/ialloc.h
lib/xtime.h

index 4bd7f16be01e8a7a24ecbf9bc056ca0d8cb2e7a6..494ca0f227a8386cc4ebc6dc6a3186483769fa85 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2023-04-13  Bruno Haible  <bruno@clisp.org>
+
+       ialloc, gethrxtime: Restore GCC diagnostics options.
+       * lib/ialloc.h: Invoke _GL_INLINE_HEADER_END.
+       * lib/xtime.h: Likewise.
+       * Makefile (sc_check_GL_INLINE_HEADER_use): New rule.
+
 2023-04-13  Bruno Haible  <bruno@clisp.org>
 
        flexmember: Fix module description (regression 2016-09-07).
index 76e3b5cc54d1ae0cea116ee663c62e7b47ef654c..d0906b23153e0054854067515cf5308d8b4de41d 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -227,6 +227,19 @@ sc_check_config_h_reminder:
        exit $$fail
 
 
+# Ensure that .h files that invoke _GL_INLINE_HEADER_BEGIN also invoke
+# _GL_INLINE_HEADER_END.  Otherwise, some GCC diagnostics remain turned off
+# for the rest of the compilation unit.
+sc_check_GL_INLINE_HEADER_use:
+       fail=0; \
+       for file in `grep -l -F -w _GL_INLINE_HEADER_BEGIN lib/*.h lib/*/*.h`; do \
+         grep -l -F -w _GL_INLINE_HEADER_END $$file >/dev/null \
+           || { echo "File $$file lacks an invocation of _GL_INLINE_HEADER_END."; \
+                fail=1; \
+              }; \
+       done; \
+       exit $$fail
+
 # Ensure that the copyright statements in files and in the module descriptions
 # are consistent.
 sc_check_copyright:
index 8d49887b6a40ccbfea112c6a1c226934ce5ab95f..22f57a47d84c668896b42c715da6e1b91fcf8889 100644 (file)
@@ -112,4 +112,6 @@ ireallocarray (void *p, idx_t n, idx_t s)
 }
 #endif
 
+_GL_INLINE_HEADER_END
+
 #endif
index 84a8a5db9ac043978f92e1f2c6fd2e549471d683..50eb4f421e25d29e7f36794dfd1c678063688cc4 100644 (file)
@@ -87,4 +87,6 @@ xtime_nsec (xtime_t t)
 }
 #endif
 
+_GL_INLINE_HEADER_END
+
 #endif