wrong enumsize if large maxvalue
Original Reporter info from Mantis: nanobit @nanobit
-
Reporter name:
Original Reporter info from Mantis: nanobit @nanobit
- Reporter name:
Description:
{mode objfpc} // implicit {
packenum 4}
type tenum = (b0, b1, b2, bMax := high(dword));
(sizeof(tenum) = 4) is ok
but error (too small) with smaller {$packenum}
*************************************
{mode delphi} // implicit {
packenum 1}
type tenum = (b0, b1, b2, bMax = high(word)+100);
(sizeof(tenum) = 4) is ok
type tenum = (b0, b1, b2, bMax = high(dword));
(sizeof(tenum) = 1) is error, should be 4
Mantis conversion info:
- Mantis ID: 34633
- OS: Windows
- OS Build: 10
- Platform: win32
- Fixed in version: 3.3.1
- Fixed in revision: 43191 (#626ef4ae)
- Monitored by: » @KaiBurghardt (Kai Burghardt)