mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-27 10:13:35 +02:00
* changed "Mixing signed expressions and longwords gives a 64bit result"
from warning into a hint (it's not a potential error, but potential optimisation advice) git-svn-id: trunk@12075 -
This commit is contained in:
parent
c1c1b2deac
commit
a00df1033f
@ -1326,7 +1326,7 @@ type_e_interface_type_expected=04034_E_interface type expected, but got "$1"
|
||||
% Type
|
||||
% TMyStream = Class(TStream,Integer)
|
||||
% \end{verbatim}
|
||||
type_w_mixed_signed_unsigned=04035_W_Mixing signed expressions and longwords gives a 64bit result
|
||||
type_h_mixed_signed_unsigned=04035_H_Mixing signed expressions and longwords gives a 64bit result
|
||||
% If you divide (or calculate the modulus of) a signed expression by a longword (or vice versa),
|
||||
% or if you have overflow and/or range checking turned on and use an arithmetic
|
||||
% expression (+, -, *, div, mod) in which both signed numbers and longwords appear,
|
||||
|
@ -371,7 +371,7 @@ const
|
||||
type_e_no_assign_to_const=04032;
|
||||
type_e_array_required=04033;
|
||||
type_e_interface_type_expected=04034;
|
||||
type_w_mixed_signed_unsigned=04035;
|
||||
type_h_mixed_signed_unsigned=04035;
|
||||
type_w_mixed_signed_unsigned2=04036;
|
||||
type_e_typecast_wrong_size_for_assignment=04037;
|
||||
type_e_array_index_enums_with_assign_not_possible=04038;
|
||||
|
@ -422,7 +422,7 @@ const msgtxt : array[0..000198,1..240] of char=(
|
||||
'04032_E_Can'#039't assign values to const variab','le'#000+
|
||||
'04033_E_Array type required'#000+
|
||||
'04034_E_interface type expected, but got "$1"'#000+
|
||||
'04035_W_Mixing signed expressions and longwords gives a 64bit result'#000+
|
||||
'04035_H_Mixing signed expressions and longwords gives a 64bit result'#000+
|
||||
'04036_W_Mixing signed expressions and cardinals here may cause a range'+
|
||||
' check error'#000+
|
||||
'04037_E_Typ','ecast has different size ($1 -> $2) in assignment'#000+
|
||||
|
@ -1123,7 +1123,7 @@ implementation
|
||||
(nodetype=subn) then
|
||||
begin
|
||||
if nodetype<>subn then
|
||||
CGMessage(type_w_mixed_signed_unsigned);
|
||||
CGMessage(type_h_mixed_signed_unsigned);
|
||||
{ mark as internal in case added for a subn, so }
|
||||
{ ttypeconvnode.simplify can remove the 64 bit }
|
||||
{ typecast again if semantically correct. Even }
|
||||
|
@ -253,7 +253,7 @@ implementation
|
||||
((ld.ordtype = u32bit) and
|
||||
is_signed(rd)) then
|
||||
begin
|
||||
CGMessage(type_w_mixed_signed_unsigned);
|
||||
CGMessage(type_h_mixed_signed_unsigned);
|
||||
if (ld.ordtype<>s64bit) then
|
||||
inserttypeconv(left,s64inttype);
|
||||
if (rd.ordtype<>s64bit) then
|
||||
|
Loading…
Reference in New Issue
Block a user