kgenz
1
Hi,
according to Barnes’ Ada 2022 book and http://www.ada-auth.org/standards/22rm_w_amd1/html/RM-3-8.html
the syntax
type A is record
…
end record A;
is allowed since Ada 2022, but setting Pragma Ada_2022 on my package and run GNAT 15.2.0, results in error “missing ;” before the type’s name.
So these seems to be an issue in GNAT. Haven’t tested with the very latests version.
Kind regards,
Kay-Uwe
22:08 … correction on syntax issue.
Reading the RM, it should be “end record A;” not “end A;”.
Best regards,
Joakim
kgenz
3
You’re right for the syntax … but that doesn’t work (neither).
that is the real code GNAT is complaining about as soon as I changed the last line from
end record; to end record Interface_Group_Flags;
type Interface_Group_Flags is record
TA_Present : Boolean := False;
TB_Present : Boolean := False;
TC_Present : Boolean := False;
TD_Present : Boolean := False;
Interface_Character_Count : Natural range 0 .. 4 := 0;
end record Interface_Group_Flags;
Max
4
GNAT doesn’t implementat whole Ada 2022 (yet?).