Przeglądaj źródła

* only allow pointer(integer) in fpc modes

git-svn-id: trunk@6598 -
peter 18 lat temu
rodzic
commit
f7a6c1e2ee
1 zmienionych plików z 11 dodań i 2 usunięć
  1. 11 2
      compiler/defcmp.pas

+ 11 - 2
compiler/defcmp.pas

@@ -899,8 +899,17 @@ implementation
                        It is also used by the compiler internally for inc(pointer,ordinal) }
                      if (eq=te_incompatible) and
                         not is_void(def_from) and
-                        (cdo_explicit in cdoptions) or
-			(cdo_internal in cdoptions) then
+			(
+                         (
+			  (cdo_explicit in cdoptions) and
+			  (
+			   (m_delphi in current_settings.modeswitches) or
+			   { Don't allow pchar(char) in fpc modes }
+			   is_integer(def_from)
+			  )
+			 ) or 
+			 (cdo_internal in cdoptions)
+			) then
                        begin
                          doconv:=tc_int_2_int;
                          eq:=te_convert_l1;