https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116130

--- Comment #12 from Joseph S. Myers <jsm28 at gcc dot gnu.org> ---
N3096 is a very old draft with lots of mistakes. Use N3220 instead (it has no
technical changes relative to C23, though it's also missing many late editorial
fixes required by ISO).

Composite types for conditional expressions are as intended.  [[noreturn]] is
not a type attribute but a declaration attribute (and GNU noreturn on types
merges differently).  Accordingly, C23 deliberately does not add the new type
attributes to any existing functions that were in previous C standard versions,
precisely because that would invalidate existing code that used conditional
expressions and was valid with previous standard versions.  It *does* put
[[unsequenced]] on the <stdbit.h> functions, as they are new in C23, and it
would be appropriate for glibc to do likewise (when building with a compiler
supporting [[__unsequenced__]]) - though as the out-of-line functions won't
normally be used, and already use __attribute_const__, the effects of doing so
would be small (and it's always OK not to have the attribute in the header,
since any program valid with it there is also valid without it).

Reply via email to