[fpc-devel] Internal error with division by QWord (Issue #33004)

Sven Barth pascaldragon at googlemail.com
Thu Jan 11 22:03:32 CET 2018

Am 11.01.2018 21:46 schrieb "J. Gareth Moreton" <gareth at moreton-family.com>:

Possibly related, but the compiler automatically treats numbers larger than
or equal to $8000000000000000 as
signed (Int64) regardless of the context or what it's being assigned to
(this usually involves compiler
warnings, but also involves causing div to be signed instead of unsigned
unless the constant is explicitly
typecast, which raises the aforementioned internal error on 'div', but not

That such a constant is Int64 is by design as Pascal is a language that
favors the signed types. If you want an unsigned constant then you need to
do a cast to a suitable type.
Of course if that cast leads to an internal error then that needs to be

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20180111/cc28b6b4/attachment.html>

More information about the fpc-devel mailing list