[Lazarus] Warning: Unreachable code. Why?

Bart bartjunk64 at gmail.com
Sat Dec 6 16:39:08 CET 2008


> Because if OS_HAS_DEFAULT_BROWSER = false then the compiler will optimise the if call away (as it
>  can never actually execute) and the "Exit" can never be reached.

Ah, now I see.

>  You would be just as effective using
>
>  {$IFDEF WINDOWS}
>    Exit;
>  {$ENDIF}
>
Yep.

Thanks for the explanation!

Bart



More information about the Lazarus mailing list