Cake is a C23 front end, but it can also be used as a static analysis tool.
The qualifiers can be empty macros then the same code can be compiled with gcc , clang and the static analysis of ownership can be using cake.
Inside visual studio for instance, we can have on external tools
The main annotations are qualifiers (similar to const). C23 attributes were considered instead of qualifiers, but qualifiers have better integration with the type system. In any case, macros are used to be declared as empty when necessary.
The qualifiers and the rules can be applied to any compiler.
Something harder to specify (but not impossible) is the flow analysis.
Sample of rule for compilers.
int * owner a;
int * b;
a = b;
we cannot assign view to an owner object.
this kind of rule does not require flow analysis.
Inside visual studio for instance, we can have on external tools
C:\Program Files (x86)\cake\cake.exe $(ItemPath) -msvc-output -no-output -analyze -nullchecks
The main annotations are qualifiers (similar to const). C23 attributes were considered instead of qualifiers, but qualifiers have better integration with the type system. In any case, macros are used to be declared as empty when necessary.
The qualifiers and the rules can be applied to any compiler. Something harder to specify (but not impossible) is the flow analysis.
Sample of rule for compilers.
int * owner a; int * b; a = b;
we cannot assign view to an owner object. this kind of rule does not require flow analysis.