View Issue Details

IDProjectCategoryView StatusLast Update
0037739FPCCompilerpublic2020-09-30 10:59
ReporterKai Burghardt Assigned ToFlorian  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionno change required 
Platformx86_64OSGNU/Linux 
Product Version3.2.0 
Fixed in Version3.3.1 
Summary0037739: {$mode ISO} accepts Extended Pascal block as a block
DescriptionIn ISO 7185 a block consist of

1. exactly one optional label-section,
2. exactly one optional const-section,
3. exactly one optional type-section,
4. exactly one optional var-section
5. optionally routine declarations and definitions
6. exactly one compound statement

in _that_ order. Confer http://pascal-central.com/iso7185.html#6.2.1%20Blocks
Steps To ReproduceHowever, the following program is accepted, but should fail to compile, because it is out of order:

{$mode ISO}
program blocks(input, output);

procedure foo;
begin
    writeLn('Hi!');
end;

var
    x: integer;

type
    r = record end;

const
    answer = 42;

begin
end.
Additional InformationIn Extended Pascal, ISO 10206, this restriction is lifted. There, in EP, can be as many sections and routine declaration/definitions parts as necessary, and they can occur in any order, as long as there is _one_ compound statement at the end.
TagsNo tags attached.
Fixed in Revision
FPCOldBugId
FPCTarget-
Attached Files

Relationships

related to 0037693 resolvedFlorian $mode ISO accepts underscores as part of identifiers 

Activities

Florian

2020-09-26 16:33

administrator   ~0125879

The same as said for 37693 applies here: ISO pascal alllows extensions and FPC does so in this case.

Issue History

Date Modified Username Field Change
2020-09-12 02:03 Kai Burghardt New Issue
2020-09-26 16:33 Florian Assigned To => Florian
2020-09-26 16:33 Florian Status new => resolved
2020-09-26 16:33 Florian Resolution open => no change required
2020-09-26 16:33 Florian Fixed in Version => 3.3.1
2020-09-26 16:33 Florian FPCTarget => -
2020-09-26 16:33 Florian Note Added: 0125879
2020-09-26 16:33 Florian Relationship added related to 0037693