From f7a6c1e2ee2c32e4705e3b8cfe3a04493c2f9b35 Mon Sep 17 00:00:00 2001 From: peter Date: Thu, 22 Feb 2007 07:01:47 +0000 Subject: [PATCH] * only allow pointer(integer) in fpc modes git-svn-id: trunk@6598 - --- compiler/defcmp.pas | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/compiler/defcmp.pas b/compiler/defcmp.pas index 723a0a32b2..027a607033 100644 --- a/compiler/defcmp.pas +++ b/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;