Index: compiler/ncnv.pas
===================================================================
--- compiler/ncnv.pas	(revision 14804)
+++ compiler/ncnv.pas	(working copy)
@@ -632,7 +632,7 @@
                   not is_objc_class_or_protocol(p.resultdef)) or
                  is_object(p.resultdef) then
                 CGMessagePos1(p.fileinfo,type_e_wrong_type_in_array_constructor,p.resultdef.typename);
-            else
+            otherwise
               CGMessagePos1(p.fileinfo,type_e_wrong_type_in_array_constructor,p.resultdef.typename);
           end;
         typecheckpass(p);
Index: compiler/options.pas
===================================================================
--- compiler/options.pas	(revision 14804)
+++ compiler/options.pas	(working copy)
@@ -2029,7 +2029,7 @@
            Message1(option_reading_further_from,'(env) '+opts);
            interpret_envvar(opts);
          end;
-       else
+       otherwise
          interpret_option(opts,true);
      end;
    end;
Index: compiler/pexpr.pas
===================================================================
--- compiler/pexpr.pas	(revision 14804)
+++ compiler/pexpr.pas	(working copy)
@@ -511,7 +511,7 @@
                          Message(parser_e_illegal_parameter_list);
                          err:=true;
                        end;
-                   else
+                   otherwise
                      begin
                        Message(parser_e_illegal_parameter_list);
                        err:=true;
Index: compiler/pstatmnt.pas
===================================================================
--- compiler/pstatmnt.pas	(revision 14804)
+++ compiler/pstatmnt.pas	(working copy)
@@ -69,6 +69,8 @@
     function if_statement : tnode;
       var
          ex,if_a,else_a : tnode;
+         prevtokenpos : longint;
+         prev_tokenpos : tfileposinfo;
       begin
          consume(_IF);
          ex:=comp_expr(true);
@@ -80,6 +82,26 @@
 
          if try_to_consume(_ELSE) then
             else_a:=statement
+         else if (token=_SEMICOLON) then
+         begin
+           prevtokenpos:=current_scanner.lasttokenpos;
+           prev_tokenpos:=current_tokenpos;
+           consume(_SEMICOLON);
+           if try_to_consume(_ELSE) then
+             else_a:=statement
+           else
+           begin
+             else_a:=nil;
+             current_scanner.nexttoken:=token;
+             current_scanner.nextidtoken:=idtoken;
+             current_scanner.nexttokenpos:=current_scanner.lasttokenpos;
+             current_scanner.next_filepos:=current_filepos;
+             token:=_SEMICOLON;
+             current_scanner.lasttoken:=token;
+             current_scanner.lasttokenpos:=prevtokenpos;
+             current_tokenpos:=prev_tokenpos;
+           end;
+         end
          else
            else_a:=nil;
          result:=cifnode.create(ex,if_a,else_a);
Index: compiler/scanner.pas
===================================================================
--- compiler/scanner.pas	(revision 14804)
+++ compiler/scanner.pas	(working copy)
@@ -99,7 +99,8 @@
           lasttokenpos,
           nexttokenpos : longint;     { token }
           lasttoken,
-          nexttoken    : ttoken;
+          nexttoken,
+          nextidtoken  : ttoken;
 
           oldlasttokenpos     : longint; { temporary saving/restoring tokenpos }
           oldcurrent_filepos,
@@ -2392,6 +2393,7 @@
       begin
         token:=nexttoken;
         nexttoken:=NOTOKEN;
+        idtoken:=nextidtoken;
         lasttokenpos:=nexttokenpos;
         current_tokenpos:=next_filepos;
         current_filepos:=current_tokenpos;
