* private.h (ATTRIBUTE_CONST, ATTRIBUTE_PURE): In commentary do not say that __attribute__((const)) is stricter than [[unsequenced]], as Jens Gustedt, an originator of [[unsequenced]], wrote in <https://lists.gnu.org/r/bug-gnulib/2025-01/msg00190.html> that some const functions are not unsequenced. To be safe, make a similar change for __attribute__((pure)) and [[reproducible]], though I don’t have confirmation from Jens. --- private.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/private.h b/private.h index 074da284..50d6a52a 100644 --- a/private.h +++ b/private.h @@ -619,11 +619,11 @@ typedef unsigned long uintmax_t; # define ATTRIBUTE_UNSEQUENCED /* empty */ #endif -/* GCC attributes that are useful in tzcode. - __attribute__((const)) is stricter than [[unsequenced]], - so the latter is an adequate substitute in non-GCC C23 platforms. - __attribute__((pure)) is stricter than [[reproducible]], - so the latter is an adequate substitute in non-GCC C23 platforms. */ +/* GNU C attributes that are useful in tzcode. + Although neither __attribute__((const)) nor __attribute__((pure)) are + stricter than their C23 counterparts [[unsequenced]] and [[reproducible]], + the C23 attributes happen to work in each tzcode use of ATTRIBUTE_CONST + and ATTRIBUTE_PURE. (This might not work outside of tzcode!) */ #if __GNUC__ < 3 # define ATTRIBUTE_CONST ATTRIBUTE_UNSEQUENCED # define ATTRIBUTE_FORMAT(spec) /* empty */ -- 2.51.0
