From b9b86eb42a1b803f97532330ed12385a7f183e66 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Thu, 30 May 2024 16:47:24 +0200 Subject: [PATCH] attribute: Improve comments. * m4/gnulib-common.m4 (gl_COMMON_BODY): Mention each macro name at the beginning of its commentary. --- ChangeLog | 6 ++++++ m4/gnulib-common.m4 | 12 ++++++++---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2792ccbb79..6ea227c411 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2024-05-30 Bruno Haible + + 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 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, -- 2.39.5