[fpc-devel] Dangerous optimization in CASE..OF
    Ondrej Pokorny 
    lazarus at kluug.net
       
    Sun Jul 16 19:58:10 CEST 2017
    
    
  
On 16.07.2017 19:24, Martok wrote:
> The good thing about case statements is that they tell me of every 
> other programmer error: missing elements (if used without else)
Off-topic: how can I enable this compiler hint?
When compiling:
program Project1;
type
   TEnum = (one, two);
var
   A: TEnum;
begin
   A := two;
   case A of
     one:
     begin
     end;
   end;
end.
I don't get any kind of warning/hint.
Ondrej
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20170716/e5383994/attachment.html>
    
    
More information about the fpc-devel
mailing list