acton icon indicating copy to clipboard operation
acton copied to clipboard

Add volatile

Open nordlander opened this issue 2 years ago • 0 comments

Add C keyword volatile to C variable declarations declared outside an exception handler but referenced inside it. Example:

def f():
   res = 0
   try:
       res = 1
       raise ValueError
   except ValueError:
       return res         # should return 1

Here the generated C code must prepend the declaration of res with volatile, in order to be insensitive to any representation tricks the C compiler might perform on the code inside the try branch.

nordlander avatar Sep 22 '23 13:09 nordlander