Let's say I have this program:
struct A {
int x;
};
struct A func1(int z) {
struct A result;
result.x = z+1;
return result;
}
int main() {
return func1(1).x;
}
When compiling this on linux with gcc -m32 -fno-stack-protector
the result of func1 will be returned as a stack pointer. How doCan I somehow set the type of func1 using __return_ptr so IDA understands this calling convention? I thought that would be the purpose of __return_ptr but, if not what does it doesn't seem to change anything in the decompilation.do?