Its the same like in 3.94. If you use ProcedureReturn at the end of the procedure it JMPs to the end to avoid reseting eax. Because if you don't use ProcedureReturn at the end it must always return 0. (Of course its the same with strings)
So its just a thing what could be optimized, but it isn't a bug.
My Optimizer for 3.94 removed this JMP if its possible. Fred said he would include a optimize-interface for the compiler to let dlls optimize the asm-output so i didn't tried to convert the Optimizer for 4.0. Fred - whats with the interface?
; If - (Not #False)
JMP No0
XOR eax,eax ; Never reached
JMP Ok0 ; Never reached
No0:
MOV eax,1
Ok0:
MOV ebx,eax ; Moving 1 into eax, then eax into ebx, then negating ebx instead of moving 0 into ebx!
NEG ebx
AND ebx,ebx
JE _EndIf2
; Debug 1
; EndIf
_EndIf2:
That's 7 unneccessary instructions. It could all have been simplified into the single "Debug 1" statement.
But personally I think it's worse that this gives a compiles without errors:
@Deeem2031:
I have searched the announced (optimizer) plugin interface too but seems its sadly not included to v4 final. the only available switches are: