LRM08: locally staticness is not sound
According to 9.4.2:
a) A literal of any type other than type TIME
...
n) An indexed name whose prefix is a locally static primary and whose index expressions are all locally static expressions
Problem: You can have a string literal with non-locally static bounds.
Example:
subtype my_rng is natural range gen to natural'high;
type my_arr is array (my_rng range <>) of character
constant c : my_arr (2 to 3) := "hh";
..
"&"(c, "ee")(4)
..
Proposed solutions:
Currently it is possible to have locally static value of a non-locally static subtype. This is slightly weird.
So we can modify rule a) and add when its subtype is locally static.
Or we can change rules n) and o) like this: whose prefix is a locally static primary of a locally subtypenh
Edited by Patrick Lehmann