Hello Paul, On Mon, 20 Jan 2025 12:42:27 -0800, Paul Eggert wrote:
> On 2025-01-20 07:48, Bruno Haible wrote: > > Why is setjmp an issue here at all? A jmp_buf cannot be used after > > the function that invoked setjmp() has returned. > > True, but nothing in the standard prohibits the jmp_buf from being > used multiple times before that return, so a call to setjmp can > return three or more times: first normally and then two or more times > via longjmp. > I agree that setjmp is a red herring; obviously it should not be > reproducible. But if it satisfies all the other conditions of > reproducibility (which is not clear to me yet since I don't fully > understand the intended meaning of reproducibility), Please tell me where I could help to explain things better. > it's probably worth mentioning setjmp specifically. It doesn't. First, because it is not a function, the synopsis given in the standard for `setjmp` is only there to document the expectation for the parameter and return type. There is no way to give an attribute a macro. But then also, calls to the function may appear as having changed objects that are not accessible to the `setjmp` call itself. For the program these changes appear after the "call" to `setjmp` has started and "before" the call ends. So they are sequenced during the call. Thus the call expression `setjmp(something)`, is not effectless. (But I will think this over and see how I could add such an explanation in the rationale or even in the proposed wording.) Thanks Jₑₙₛ -- :: ICube :::::::::::::::::::::::::::::: deputy director :: :: Université de Strasbourg :::::::::::::::::::::: ICPS :: :: INRIA antenne de Strasbourg :::::::::::::::::: Camus :: :: INRIA PIQ program Strasbourg :::::::::: piq.inria.fr :: :: :::::::::::::::::::::::::::::::::::: ☎ +33 368854536 :: :: https://icube-icps.unistra.fr/index.php/Jens_Gustedt ::