View Issue Details

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

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

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.

type
  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];
  end;
TagsNo tags attached.
Fixed in Revision
FPCOldBugId
FPCTarget
Attached Files

Activities

There are no notes attached to this issue.

Issue History

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