Skip to content
  • Maria Matejka's avatar
    980ef110
    C Compiler Attribute Cleanup Test · 980ef110
    Maria Matejka authored
    There is a long-known CC attribute cleanup which allows to call a custom
    cleanup function when an auto-storage variable ceases to exist. We're
    gonna use it for end-of-loop and leave-locked-block macros.
    
    This commit adds a static unit test for this compiler feature to be sure
    that it really does what we want. We're looking forward to the next ISO
    C norm where this may finally get a nice syntax and standardization.
    980ef110
    C Compiler Attribute Cleanup Test
    Maria Matejka authored
    There is a long-known CC attribute cleanup which allows to call a custom
    cleanup function when an auto-storage variable ceases to exist. We're
    gonna use it for end-of-loop and leave-locked-block macros.
    
    This commit adds a static unit test for this compiler feature to be sure
    that it really does what we want. We're looking forward to the next ISO
    C norm where this may finally get a nice syntax and standardization.
Loading