[fpc-devel] Unreachable code warnings

Florian Klaempfl florian at freepascal.org
Sun Oct 14 23:39:52 CEST 2007


Joao Morais schrieb:
> Daniƫl Mantione wrote:
>> The warning is fixable: Remove the superfluous check.
> 
> All,
> 
> a new contribution to this theme. What about this warning:
> 
> {$mode objfpc}
> uses sysutils;
> function testresult: boolean;
> begin
>   raise exception.create('foo');
> end;
> begin
>   testresult;
> end.
> 
> The compiler warns that the result wasn't assigned, but that function's
> result simply cannot be reached.

Fixed in trunk when compiled with -Oodfa which will be probably a
default in 2.4.0.



More information about the fpc-devel mailing list