On 03.11.2015 20:34, Ondrej Pokorny wrote:
A problem could be with such code:
var
   i: SizeInt;
   j: Integer;
begin
   k:=i+j;
end;
Because obviously on 32bit SizeInt=longint and Integer=longint, so there won't be a deterministic way which type wins.

But this is a similar issue like the one from this report (check all different IFDEFs for the "biggest" type)...
http://bugs.freepascal.org/view.php?id=28317
So probably not to be solved.

Otherwise IMO the comparison of base types and using the aliases from the definitions is the cleanest way to do it. What if I use my own aliases that won't be supported by CodeTools or if I redefine the usual aliases (I know, bad idea, but still)? The "compare base types - use aliases" approach will still work.

Ondrej

--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to