i found a workaround for this issue
i'm using asm jmp instead of goto
but i still would like to know if there is other solution.
my mistake this is not working,
i found what's going on,
when optimize is on,
and the compiler reach a branch instruction: jmp, return , etc..
he skip all the code below, doesn't compile t at all,
so if there was a jump to this code from somewhere else,
there will be an error
example:
dosomething();
_asm call my_label
return;
my_label:
// anything i write here, will be ignored, when optimize is on,
//this is a bug, because if there is a label, this code can be called from somewhere else
//and it shouldn't be skipped.
exit0000:;
anyway at the meantime i found a workaround,
instead of direct jmp, i'm using indirect:
// instead of return, i'm usign jmp to exit0000 like this:
{_asm mov eax, exit0000 _asm jmp eax}