From: Bruno Haible <bruno@clisp.org>
Date: Thu, 30 May 2024 14:47:24 +0000 (+0200)
Subject: attribute: Improve comments.
X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=b9b86eb42a1b803f97532330ed12385a7f183e66;p=gnulib.git

attribute: Improve comments.

* m4/gnulib-common.m4 (gl_COMMON_BODY): Mention each macro name at the
beginning of its commentary.
---

diff --git a/ChangeLog b/ChangeLog
index 2792ccbb79..6ea227c411 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2024-05-30  Bruno Haible  <bruno@clisp.org>
+
+	attribute: Improve comments.
+	* m4/gnulib-common.m4 (gl_COMMON_BODY): Mention each macro name at the
+	beginning of its commentary.
+
 2024-05-30  Collin Funk  <collin.funk1@gmail.com>
 
 	endian: Quote variables that may be undefined (regr. 2024-05-18).
diff --git a/m4/gnulib-common.m4 b/m4/gnulib-common.m4
index a1254cf678..fba5158ced 100644
--- a/m4/gnulib-common.m4
+++ b/m4/gnulib-common.m4
@@ -203,7 +203,8 @@ AC_DEFUN([gl_COMMON_BODY], [
 # endif
 #endif
 
-/* It is OK for a compiler to move calls to the function and to omit
+/* _GL_ATTRIBUTE_CONST declares:
+   It is OK for a compiler to move calls to the function and to omit
    calls to the function if another call has the same arguments or the
    result is not used.
    This attribute is safe for a function that neither depends on
@@ -521,7 +522,8 @@ AC_DEFUN([gl_COMMON_BODY], [
 # endif
 #endif
 
-/* It is OK for a compiler to move calls to the function and to omit
+/* _GL_ATTRIBUTE_PURE declares:
+   It is OK for a compiler to move calls to the function and to omit
    calls to the function if another call has the same arguments or the
    result is not used, and if observable state is the same.
    This attribute is safe for a function that does not affect observable state
@@ -539,7 +541,8 @@ AC_DEFUN([gl_COMMON_BODY], [
 # endif
 #endif
 
-/* It is OK for a compiler to move calls to the function and to omit duplicate
+/* _GL_ATTRIBUTE_REPRODUCIBLE declares:
+   It is OK for a compiler to move calls to the function and to omit duplicate
    calls to the function with the same arguments, so long as the state
    addressed by its arguments is the same and is updated in time for
    the rest of the program.
@@ -584,7 +587,8 @@ AC_DEFUN([gl_COMMON_BODY], [
 # endif
 #endif
 
-/* It is OK for a compiler to move calls to the function and to omit duplicate
+/* _GL_ATTRIBUTE_UNSEQUENCED declares:
+   It is OK for a compiler to move calls to the function and to omit duplicate
    calls to the function with the same arguments, so long as the state
    addressed by its arguments is the same.
    This attribute is safe for a function that is effectless, idempotent,