FT22 has been updated to reflect the needs of array bounds to be locally static
if the resulting expression is to be locally static.
Regards,
John
-- -- mailto: johnr@model.com phone: (503)685-0864 -- http://www.model.com fax: (503)685-0921 --
IEEE 200X Fast Track Change Proposal
ID: FT-22
Proposer: John Ries
email: johnr@model.com
Status: Open
Proposed: 04/20/04
Analyzed: Date
Resolved: Date
Enhancement Summary: Allow aggregates, array operands, and array operators
to be locally static.
Related issues:
Relevant LRM section: 7.4.1
Enhancement Detail:
----------------------------
Currently the only locally static non-scalars are bit string literals
and string literals. As a result aggregates, concatenation, slices,
or functions returning composites cannot be used in places that
require locally static expression such as choices for cases.
This enhancement is to modify the statement
"An expression is said to be locally static if and only if every
operator in the expression denotes an implicitly defined operator
whose operands and result are scalar and if every primary in the
expression is a locally static primary, where locally static primary
is defined to be one of the following:"
To
"An expression is said to be locally static if and only if every
operator in the expression denotes an implicitly defined operator
and if every primary in the expression is a locally static primary,
where locally static primary is defined to be one of the following:"
Item b in the list is modified to
b) A constant (other than a deferred constant) explicitly declared by
a constant declaration with a locally static subtype and initialized
with a locally static expression.
The line 606 in section 7.4.1 is changed from
"A locally static array subtype is a constrained array subtype formed
by imposing on an unconstrained array type a locally static index
constraint"
to
"A locally static array subtype is a constrained array subtype formed
by imposing on an unconstrained array type with a locally static index
constraint. The unconstained array type must have a locally static element subtype
and locally static index subtype definitions."
Addition items defining a locally static primary would be added
"k) An array aggregate, if and only if
1) All expression in its element associations are locally static
expressions, and
2) All ranges in its element associations are locally static
ranges
l) A record aggregate, if and only if all expressions in its
element associations are locally static expressions
m) A subelement or a slice of a locally static primary, provided
that any index expressions are locally static expressions and any
discrete ranges used in slice names are locally static discrete
ranges
A locally static range is either a range of the second form (see 3.1) whose
bounds are locally static expressions, or a range of the first form whose prefix
denotes either a locally static subtype or and object that is of a locally static
subtype. A locally static range constraint is a range constraint whose range is
locally static.
n) A selected name, whose prefix denotes a locally static primary."
These changes allow better use of existing language construct at the
expense of compiler complexity. Specifically the inability to use
& in constants that are then used as case choices currently is illegal
and causes users problems.
Analysis:
----------------------------
[To be performed by the 200X Fast Track Working Group]
Resolution:
----------------------------
[To be performed by the 200X Fast Track Working Group]
Received on Mon Nov 15 16:06:48 2004
This archive was generated by hypermail 2.1.8 : Mon Nov 15 2004 - 16:06:50 PST