View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0038536 | FPC | Compiler | public | 2021-02-23 18:34 | 2021-04-07 14:25 |
Reporter | Kai Burghardt | Assigned To | Jonas Maebe | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | won't fix | ||
Platform | x86_64 | OS | GNU/Linux | ||
Product Version | 3.2.0 | ||||
Summary | 0038536: feature request for _true_ bitpacked arrays | ||||
Description | I would appreciate if there were /true/ bitpacked data structures. It is still possible to declare data types that will leave bits unused, compare the following example: | ||||
Steps To Reproduce | The following program will report a `sizeOf` 2 Bytes. program staticArray(input, output, stdErr); type x = (left, right); y = (up, down); z = bitpacked array[x, y] of Boolean; begin writeLn( sizeOf(z):2, 'B':2); writeLn(bitSizeOf(z):2, 'b':2); end. Frankly, I would have expected a `bitSizeOf` 4 (four), though. | ||||
Additional Information | Using short notation makes no difference. This type definition produces the same: z = bitpacked array[x] of bitpacked array[y] of Boolean; | ||||
Tags | No tags attached. | ||||
Fixed in Revision | |||||
FPCOldBugId | |||||
FPCTarget | - | ||||
Attached Files |
|
|
Only ordinals can be bitpacked. A two dimensional array is indeed equivalent to an array of arrays, and arrays are not ordinal types. The same holds for arrays of bitpacked records, or array fields in bipacked records. This is compatible with all ABIs I know of, and there are no plans to change this. |
Date Modified | Username | Field | Change |
---|---|---|---|
2021-02-23 18:34 | Kai Burghardt | New Issue | |
2021-02-23 19:11 | Jonas Maebe | Assigned To | => Jonas Maebe |
2021-02-23 19:11 | Jonas Maebe | Status | new => resolved |
2021-02-23 19:11 | Jonas Maebe | Resolution | open => won't fix |
2021-02-23 19:11 | Jonas Maebe | FPCTarget | => - |
2021-02-23 19:11 | Jonas Maebe | Note Added: 0129126 |