Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2000-12

New constant handling

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Jonas Maebe

Hello,

As of tomorrow, the 1.1 snapshot will have a rewritten constant handling. Since the support for 64bit constants was introduced in 1.1, all hex constants > $7fffffff were sign extended (so if you wrote $80000000, it was actually interpreted as $ffffffff80000000).

This is now fixed, but the result is that those numbers between $80000000 and $ffffffff (when using the hex notation) are now cardinals instead of longints. As such, you will get range check errors (when using -Cr) if you try to pass such a value as a longint paramter. Use an explicit longint() typecast to overcome this (you'll still ge a warning though)

Jonas

Reply by email