2
0
Эх сурвалжийг харах

* For 8/16 bit CPUs and TP mode, disable expansion to a larger integer type for subtract operations on unsigned integers. This is TP7 compatible.

git-svn-id: trunk@46233 -
yury 5 жил өмнө
parent
commit
719220e8a4

+ 5 - 1
compiler/nadd.pas

@@ -2225,7 +2225,11 @@ implementation
                    This is compatible with the code below for other unsigned types (PFV) }
                    This is compatible with the code below for other unsigned types (PFV) }
                  if is_signed(left.resultdef) or
                  if is_signed(left.resultdef) or
                     is_signed(right.resultdef) or
                     is_signed(right.resultdef) or
-                    (nodetype=subn) then
+                    ((nodetype=subn)
+{$if defined(cpu8bitalu) or defined(cpu16bitalu)}
+                     and not (m_tp7 in current_settings.modeswitches)
+{$endif}
+                    ) then
                    begin
                    begin
                      if nodetype<>subn then
                      if nodetype<>subn then
                        CGMessage(type_h_mixed_signed_unsigned);
                        CGMessage(type_h_mixed_signed_unsigned);