Date: Tue, 10 Feb 2026 11:46:34 -0800
On Tuesday, 10 February 2026 11:36:52 Pacific Standard Time Alejandro Colomar
wrote:
> If misuse is easy, it will happen. We could perfectly design these
> tools so that misuse is harder. In C terms, misusing [[reproducible]]
> should result in a constraint violation. I think this is viable. The
> attribute would have to be part of the function type, to make it
> propagate well, and the function could not contain any uses of volatile
> lvalues, any static-storage-duration objects, nor any
> non-[[reproducible]] function calls.
>
> A language that puts the burden on the programmer is just badly
> designed.
I'm not passing judgement on the benefit of having the diagnostics. We well
should.
But from the point of view of the language, we don't have to, for an
attribute. If you make it part of the function type and make it ill-formed to
violate the constraints, that's a different story.
wrote:
> If misuse is easy, it will happen. We could perfectly design these
> tools so that misuse is harder. In C terms, misusing [[reproducible]]
> should result in a constraint violation. I think this is viable. The
> attribute would have to be part of the function type, to make it
> propagate well, and the function could not contain any uses of volatile
> lvalues, any static-storage-duration objects, nor any
> non-[[reproducible]] function calls.
>
> A language that puts the burden on the programmer is just badly
> designed.
I'm not passing judgement on the benefit of having the diagnostics. We well
should.
But from the point of view of the language, we don't have to, for an
attribute. If you make it part of the function type and make it ill-formed to
violate the constraints, that's a different story.
-- Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org Principal Engineer - Intel Data Center - Platform & Sys. Eng.
Received on 2026-02-10 19:46:43
