[[unsequenced]] in <stdbit.h>Authors: Joseph Myers
Date: 2026-08-26
Submitted against: C2Y (N3886 draft)
Status: Review
When
N3367
(More Modern Bit Utilities) was adopted for C2Y, it was without
[[unsequenced]] attributes, since those in the paper were neither
complete nor all correct, and with the expectation of a separate paper
later to add such attributes. They should be added to all the new
functions except for the stdc_store8_* functions.
Add the [[unsequenced]] attributes immediately before the final
semicolon of all <stdbit.h> functions (including generic functions)
in 7.18.17 (Rotate Left), 7.18.18 (Rotate Right), 7.18.19 (8-bit
Memory Reversal), 7.18.20 (Exact-width 8-bit Memory Reversal), and
7.18.21 (Endian-Aware 8-bit Load).
Comment from Jay Ghiron on 2026-10-09:
The function stdc_memreverse8 in 7.18.19 should not have
[[unsequenced]] because it is not idempotent. That is, calling
stdc_memreverse8 twice with the same argument is not always
equivalent to omitting the second call. The stdc_store8_* functions
in 7.18.22 could have [[unsequenced]] because repeating a call
immediately after always has no effect, and they meet the other
requirements.
Comment from Issues list maintainer on 2026-11-25:
At the November 2026 (Búzios) meeting of WG14, a modified version of the suggested correction was accepted, taking into account Jay Ghiron's comments, subject to review at the April 2027 meeting.
In the N3998 draft of C2Y, add the [[unsequenced]] attribute
immediately before the final semicolon of all <stdbit.h> functions
(including generic functions) in 7.18.17 (Rotate Left), 7.18.18
(Rotate Right), 7.18.20 (Exact-width 8-bit Memory Reversal), 7.18.21
(Endian-Aware 8-bit Load), and 7.18.22 (Endian-Aware 8-bit Store).