View Issue Details

IDProjectCategoryView StatusLast Update
0038829FPCCompilerpublic2021-04-30 16:49
ReporterRyan Joseph Assigned To 
Status newResolutionopen 
Summary0038829: Range overflow in array properties
DescriptionThere should at least be a warning and an error if range checks are enabled.

  TPixel = record
    components: array[0..3] of byte;
    property A: byte read components[10] write components[10];

if the array length is a generic constant parameter the warning should be suppressed so that different combinations of properties can work with various specializations.

  generic TPixel<const L: integer> = record
    components: array[0..L - 1] of byte;
    // index 10 may be valid depending on specialization so don't issue a warning
    property A: byte read components[10] write components[10];
TagsNo tags attached.
Fixed in Revision
Attached Files


There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2021-04-30 16:49 Ryan Joseph New Issue