From: user5857@newsgrouper.org.invalid   
      
   Niklas Holsti posted:   
      
   > On 2025-11-05 23:28, MitchAlsup wrote:   
   > >   
   > > Niklas Holsti posted:   
   >----------------   
   > >> But then you could get the problem of a longjmp to a setjmp value that   
   > >> is stale because the targeted function invocation (stack frame) is no   
   > >> longer there.   
   > >   
   > > But YOU had to pass the jumpbuf out of the setjump() scope.   
   > >   
   > > Now, YOU complain there is a hole in your own foot with a smoking gun   
   > > in your own hand.   
   >   
   > That is not the issue. The question is if the semantics of "goto   
   > label-valued-variable" are hard to define, as Ritchie said, or not, as   
   > Anton thinks Stallman said or would have said.   
      
   So, label-variables are hard to define, but function-variables are not ?!?   
      
   > The discussion above shows that whether a label value is implemented as   
   > a bare code address, or as a jumpbuf, some cases will have Undefined   
   > Behavior semantics. So I think Ritchie was right, unless the undefined   
   > cases can be excluded at compile time.   
   >   
   > The undefined cases could be excluded at compile-time, even in C, by   
   > requiring all label-valued variables to be local to some function and   
   > forbidding passing such values as parameters or function results. In   
   > addition, the use of an uninitialized label-valued variable should be   
   > prevented or detected. Perhaps Anton could accept such restrictions.   
   >   
   > Niklas   
   >   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|