View Issue Details

IDProjectCategoryView StatusLast Update
0035849FPCCompilerpublic2019-07-20 22:19
ReporterKai BurghardtAssigned ToJonas Maebe 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionduplicate 
Platformx86_64OSGNU/LinuxOS Version4.2
Product Version3.0.4Product Build3.0.4+dfsg-11 [2017/12/30] 
Target VersionFixed in Version 
Summary0035849: huge enumeration type definitions (i. e. sizeOf > 4) silently fails
DescriptionOne can define enumeration type elements that are not storeable.
Steps To Reproduceprogram bigEnum(input, output, stderr);
var
    enum: (null = 0, semimax = high(longWord), max = high(qWord));
begin
    enum := max;
    writeLn(enum); // erroneously prints "semimax"
end.
Additional InformationThe {$packEnum} directive only allows enumeration types up to and including 4 bytes. Maybe this needs an update?
Tagscompiler
Fixed in Revision
FPCOldBugId
FPCTarget-
Attached Files

Relationships

duplicate of 0034633 resolvedFlorian wrong enumsize if large maxvalue 

Activities

nanobit

2019-07-14 18:54

reporter   ~0117260

There is an upper limit (high(longint)), see https://bugs.freepascal.org/view.php?id=34633

Kai Burghardt

2019-07-14 23:01

reporter   ~0117262

Thank you. I didn’t find your issue, because I searched for issues containing “enumeration” paired with various terms (e. g. “size”, “max”, etc.)

Mark as duplicate of 0034633 and close.

Issue History

Date Modified Username Field Change
2019-07-14 18:41 Kai Burghardt New Issue
2019-07-14 18:41 Kai Burghardt Tag Attached: compiler
2019-07-14 18:54 nanobit Note Added: 0117260
2019-07-14 23:01 Kai Burghardt Note Added: 0117262
2019-07-20 22:19 Jonas Maebe Assigned To => Jonas Maebe
2019-07-20 22:19 Jonas Maebe Status new => resolved
2019-07-20 22:19 Jonas Maebe Resolution open => duplicate
2019-07-20 22:19 Jonas Maebe FPCTarget => -
2019-07-20 22:19 Jonas Maebe Relationship added duplicate of 0034633