[fpc-devel] Unreachable code warnings

Micha Nelissen micha at neli.hopto.org
Sun Oct 14 19:40:04 CEST 2007


Hi,

I want to bring up the warning of unreachable code. If one is
implementing code according to some spec, e.g. RFC, or what else, it
occurs that that requires a sanity check on user input. If it now
happens that the type of variable by accident guarantees that this is
true; this is fine, the compiler might optimize the check away. The
compiler should not give a warning though IMHO, because the check is
necessary according to spec, and it might become necessary if someone
decides to change the type of the variable being checked to have a wider
range. Furthermore, the warning is not suppressible.

Micha



More information about the fpc-devel mailing list