Issues with structured types alignment documentation
Original Reporter info from Mantis: Lychee
-
Reporter name:
Original Reporter info from Mantis: Lychee
- Reporter name:
Description:
The paragraph 8.3.2 Structured types alignment [*] reads:
For example a record or object having a 1 byte element, will have its
size rounded up to 2, so the size of the structure will actually be 2 bytes.
The code in steps to reproduce prints out a value 1 for me, in contradiction to what the documentation reads.
That would imply that either the code below produces the wrong result or the documentation is not entirely correct.
Obviously, i opted for the documentation being wrong there.
[*] http://www.freepascal.org/docs-html/3.0.0/prog/progsu172.html#x217-2300008.3.2
Steps to reproduce:
program test;
Type
TOneByteRecord = record
One: Byte;
end;
var
x: TOneBytyeRecord
begin
WriteLn(SizeOf(x));
end.
Mantis conversion info:
- Mantis ID: 31418
- Version: 3.0.0
- Fixed in version: 3.1.1
- Fixed in revision: 1406 (#fee262d2)
- Target version: 3.2.0