Paul Eggert wrote:
> Thanks for reporting that. I installed the attached.

Thanks. So, at the root, it was a restriction w.r.t. _GL_WARN_ON_USE,
that we did not know about. Let me document it.


2024-02-05  Bruno Haible  <[email protected]>

        snippet/warn-on-use: Add comment.
        * lib/warn-on-use.h: Document a restriction of _GL_WARN_ON_USE.

diff --git a/lib/warn-on-use.h b/lib/warn-on-use.h
index 8f4d40dcbe..701013a07f 100644
--- a/lib/warn-on-use.h
+++ b/lib/warn-on-use.h
@@ -32,6 +32,10 @@
    _GL_WARN_ON_USE_ATTRIBUTE is for functions with 'static' or 'inline'
    linkage.
 
+   _GL_WARN_ON_USE should not be used more than once for a given function
+   in a given compilation unit (because this may generate a warning even
+   if the function is never called).
+
    However, one of the reasons that a function is a portability trap is
    if it has the wrong signature.  Declaring FUNCTION with a different
    signature in C is a compilation error, so this macro must use the




Reply via email to