This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug ada/15799] Legal program rejected, using 'Base
- From: "sam at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 4 Dec 2007 18:55:56 -0000
- Subject: [Bug ada/15799] Legal program rejected, using 'Base
- References: <bug-15799-286@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #5 from sam at gcc dot gnu dot org 2007-12-04 18:55 -------
Ludovic,
in RM 3.6:
(2)
array_type_definition ::=
unconstrained_array_definition | constrained_array_definition
(3)
unconstrained_array_definition ::=
array(index_subtype_definition {, index_subtype_definition}) of
component_definition
(4)
index_subtype_definition ::= subtype_mark range <>
(5)
constrained_array_definition ::=
array (discrete_subtype_definition {, discrete_subtype_definition})
of component_definition
(6)
discrete_subtype_definition ::= discrete_subtype_indication | range
(7)
component_definition ::= [aliased] subtype_indication
As you said, Boolean'Base is unconstrained, so we are obviously in the
unconstrained_array_definition case as we do not have a
discrete_subtype_indication. Which means that "range <>" is mandatory.
Indeed, if you use
type a3 is array (Boolean'Base range <>) of Integer;
then GNAT will be happy.
Do we agree that this is not a bug after all?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15799