GCC 11 lets C declarations describe resource ownership
engineeringcgccdiagnosticsmemoryGCC 11.1 extends allocation attributes with matching deallocators and adds C2x diagnostics. These declarations let the compiler recognize ownership mistakes across an API boundary.