Hi Paul, On 2026-02-14T12:42:56-0800, Paul Eggert wrote: > On 2026-02-14 12:24, Alejandro Colomar wrote: > > > There's no such requirement for [[noreturn]] in C23, and for good reason. > > > Why should there be such a requirement for [[reproducible]]? > > Indeed, there's discussion on [[noreturn]] going on at the moment, both > > in WG14 and WG21. Don't consider any existing standard attributes to be > > settled or good. > > The only discussion I know about in WG14 is N3483 > <https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3483.pdf>
There's more in the mailing lists. A recent suggestion was to disallow
the 'return' statement in [[noreturn]] functions (because it makes no
sense). That would disallow it even within if(0):
[[noreturn]]
void
f(void)
{
if (0)
return; // Constraint violation
exit(0);
}
For the same exact reasons we have in alx-0087.
Cheers,
Alex
> and it does not
> have the problem that I mentioned - assuming its notion of "control flow" is
> formally defined in some other part of C2y in a way that works with real
> compilers and real programs (and if so, where is it defined?).
>
> At any rate, if there's going to be a change to [[reproducible]] along the
> lines proposed for [[noreturn]], such a change needs to refer to "control
> flow", whatever "control flow" means.
--
<https://www.alejandro-colomar.es>
signature.asc
Description: PGP signature
