mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-16 15:59:30 +02:00
* Consider conversion from integer to integer te_equal, if the base types
are equal and the range of the from type fits in the to type. I.e. conversion from -10..10 to shortint is considered equal. This is correct because in this case, the from type can be used wherever the to type is used, i.e. the compiler never needs to do conversion at compile or run time. git-svn-id: trunk@7814 -
This commit is contained in:
parent
201fc56655
commit
504d845e86
@ -225,8 +225,8 @@ implementation
|
||||
u8bit,u16bit,u32bit,u64bit,
|
||||
s8bit,s16bit,s32bit,s64bit:
|
||||
begin
|
||||
if (torddef(def_from).low=torddef(def_to).low) and
|
||||
(torddef(def_from).high=torddef(def_to).high) then
|
||||
if (torddef(def_from).low>=torddef(def_to).low) and
|
||||
(torddef(def_from).high<=torddef(def_to).high) then
|
||||
eq:=te_equal
|
||||
else
|
||||
begin
|
||||
|
Loading…
Reference in New Issue
Block a user