thradams / cake

Cake a C23 front end and transpiler written in C
http://thradams.com/cake/index.html
GNU General Public License v3.0
552 stars 26 forks source link

_Out should me applied only for parameters (missing error) #201

Open thradams opened 2 months ago

thradams commented 2 months ago
#pragma safety enable

struct X  {
    _Out char* s;  //must be an error
};
void f(_Out int i); //error

//only for pointer to something _Out
//this includes arrays
void f(_Out char s[2]); //ok
void f(_Out char *s); //ok