mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-01 23:30:20 +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
|
% Type
|
||||||
% TMyStream = Class(TStream,Integer)
|
% TMyStream = Class(TStream,Integer)
|
||||||
% \end{verbatim}
|
% \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),
|
% 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
|
% 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,
|
% 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_no_assign_to_const=04032;
|
||||||
type_e_array_required=04033;
|
type_e_array_required=04033;
|
||||||
type_e_interface_type_expected=04034;
|
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_w_mixed_signed_unsigned2=04036;
|
||||||
type_e_typecast_wrong_size_for_assignment=04037;
|
type_e_typecast_wrong_size_for_assignment=04037;
|
||||||
type_e_array_index_enums_with_assign_not_possible=04038;
|
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+
|
'04032_E_Can'#039't assign values to const variab','le'#000+
|
||||||
'04033_E_Array type required'#000+
|
'04033_E_Array type required'#000+
|
||||||
'04034_E_interface type expected, but got "$1"'#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'+
|
'04036_W_Mixing signed expressions and cardinals here may cause a range'+
|
||||||
' check error'#000+
|
' check error'#000+
|
||||||
'04037_E_Typ','ecast has different size ($1 -> $2) in assignment'#000+
|
'04037_E_Typ','ecast has different size ($1 -> $2) in assignment'#000+
|
||||||
|
@ -1123,7 +1123,7 @@ implementation
|
|||||||
(nodetype=subn) then
|
(nodetype=subn) then
|
||||||
begin
|
begin
|
||||||
if nodetype<>subn then
|
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 }
|
{ mark as internal in case added for a subn, so }
|
||||||
{ ttypeconvnode.simplify can remove the 64 bit }
|
{ ttypeconvnode.simplify can remove the 64 bit }
|
||||||
{ typecast again if semantically correct. Even }
|
{ typecast again if semantically correct. Even }
|
||||||
|
@ -253,7 +253,7 @@ implementation
|
|||||||
((ld.ordtype = u32bit) and
|
((ld.ordtype = u32bit) and
|
||||||
is_signed(rd)) then
|
is_signed(rd)) then
|
||||||
begin
|
begin
|
||||||
CGMessage(type_w_mixed_signed_unsigned);
|
CGMessage(type_h_mixed_signed_unsigned);
|
||||||
if (ld.ordtype<>s64bit) then
|
if (ld.ordtype<>s64bit) then
|
||||||
inserttypeconv(left,s64inttype);
|
inserttypeconv(left,s64inttype);
|
||||||
if (rd.ordtype<>s64bit) then
|
if (rd.ordtype<>s64bit) then
|
||||||
|
Loading…
Reference in New Issue
Block a user