Hi,
There is this rather experimental C compiler/transpiler Cake that makes not 
only C23 features available for older C compilers but also introduces new 
safety features such as object lifetime checks in the form of 

´´´
#pragma safety enable
#include <stdio.h>
int main()
{
    FILE *_Owner _Opt f = fopen("file.txt", "r");
    if (f)
    {
       fclose(f);
    }
}
try
´´´

I think something similar would be great in Crunch.

Cake: http://thradams.com/cake/ownership.html#toc_3

Ben

Reply via email to