* [Bug ada/15799] Legal program rejected, using 'Base
[not found] <bug-15799-286@http.gcc.gnu.org/bugzilla/>
@ 2007-11-26 21:02 ` sam at gcc dot gnu dot org
2007-11-30 21:22 ` ludovic at ludovic-brenta dot org
` (4 subsequent siblings)
5 siblings, 0 replies; 11+ messages in thread
From: sam at gcc dot gnu dot org @ 2007-11-26 21:02 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from sam at gcc dot gnu dot org 2007-11-26 21:02 -------
Ludovic,
I don't think this is correct. You can use a subtype_mark here, but it is
defined as being a subtype_/name/, not any expression returning a type. See RM
3.2.2 and RM 3.5.
--
sam at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |sam at gcc dot gnu dot org
Status|NEW |WAITING
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15799
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug ada/15799] Legal program rejected, using 'Base
[not found] <bug-15799-286@http.gcc.gnu.org/bugzilla/>
2007-11-26 21:02 ` sam at gcc dot gnu dot org
@ 2007-11-30 21:22 ` ludovic at ludovic-brenta dot org
2007-11-30 21:32 ` sam at gcc dot gnu dot org
` (3 subsequent siblings)
5 siblings, 0 replies; 11+ messages in thread
From: ludovic at ludovic-brenta dot org @ 2007-11-30 21:22 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from ludovic at ludovic-brenta dot org 2007-11-30 21:22 -------
But Boolean'Base is not an expression, since it does not define "the
computation or retrieval of a value" (4.4(1)) but instead "denotes an
unconstrained subtype" (3.5(15)). So, it really is a subtype_name.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15799
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug ada/15799] Legal program rejected, using 'Base
[not found] <bug-15799-286@http.gcc.gnu.org/bugzilla/>
2007-11-26 21:02 ` sam at gcc dot gnu dot org
2007-11-30 21:22 ` ludovic at ludovic-brenta dot org
@ 2007-11-30 21:32 ` sam at gcc dot gnu dot org
2007-12-04 18:56 ` sam at gcc dot gnu dot org
` (2 subsequent siblings)
5 siblings, 0 replies; 11+ messages in thread
From: sam at gcc dot gnu dot org @ 2007-11-30 21:32 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from sam at gcc dot gnu dot org 2007-11-30 21:32 -------
I checked in the RM. "subtype_mark" is defined as a "/subtype/_name" which is
equivalent to a "name" which is not specifically defined. And "subtype_mark" is
used in "relation" which accepts T'Base after the "in" keyword, so I guess you
are right here.
--
sam at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed|2005-06-14 04:55:55 |2007-11-30 21:32:34
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15799
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug ada/15799] Legal program rejected, using 'Base
[not found] <bug-15799-286@http.gcc.gnu.org/bugzilla/>
` (2 preceding siblings ...)
2007-11-30 21:32 ` sam at gcc dot gnu dot org
@ 2007-12-04 18:56 ` sam at gcc dot gnu dot org
2007-12-04 20:35 ` ludovic at ludovic-brenta dot org
2009-08-06 20:39 ` ludovic at ludovic-brenta dot org
5 siblings, 0 replies; 11+ messages in thread
From: sam at gcc dot gnu dot org @ 2007-12-04 18:56 UTC (permalink / raw)
To: gcc-bugs
------- 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
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug ada/15799] Legal program rejected, using 'Base
[not found] <bug-15799-286@http.gcc.gnu.org/bugzilla/>
` (3 preceding siblings ...)
2007-12-04 18:56 ` sam at gcc dot gnu dot org
@ 2007-12-04 20:35 ` ludovic at ludovic-brenta dot org
2009-08-06 20:39 ` ludovic at ludovic-brenta dot org
5 siblings, 0 replies; 11+ messages in thread
From: ludovic at ludovic-brenta dot org @ 2007-12-04 20:35 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from ludovic at ludovic-brenta dot org 2007-12-04 20:35 -------
The fact that Boolean'Base is unconstrained _doesn't_ imply
that we don't have a discrete_subtype_indication. Discreteness
and constrainedness aren't the same thing, and one doesn't
imply the other. Boolean'Base is discrete because all Boolean
types are discrete. A discrete_subtype_indication is a
subtype_indication that happens to be discrete, and a subtype_indication
is defined in RM 3.2.2(3) as a subtype_mark with an optional
constraint, and a subtype_mark is defined in 3.2.2(4) as
a subtype_name, which is a name that denotes a subtype, and
a name is defined in RM 4.1(2) as including an attribute_reference.
So this is still a bug.
--
ludovic at ludovic-brenta dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |NEW
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15799
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug ada/15799] Legal program rejected, using 'Base
[not found] <bug-15799-286@http.gcc.gnu.org/bugzilla/>
` (4 preceding siblings ...)
2007-12-04 20:35 ` ludovic at ludovic-brenta dot org
@ 2009-08-06 20:39 ` ludovic at ludovic-brenta dot org
5 siblings, 0 replies; 11+ messages in thread
From: ludovic at ludovic-brenta dot org @ 2009-08-06 20:39 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from ludovic at ludovic-brenta dot org 2009-08-06 20:39 -------
Confirmed in 4.4.1.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15799
^ permalink raw reply [flat|nested] 11+ messages in thread