sem_eval.adb (Eval_Real_Literal): N_Constant_Declaration is a static context, so do not call Check_Non_Static_Context.
2007-12-06 Geert Bosch <bosch@adacore.com> * sem_eval.adb (Eval_Real_Literal): N_Constant_Declaration is a static context, so do not call Check_Non_Static_Context. From-SVN: r130857
This commit is contained in:
parent
d215a13cd9
commit
a1980be831
|
@ -2241,14 +2241,16 @@ package body Sem_Eval is
|
||||||
-- in the expander that do not correspond to static expressions.
|
-- in the expander that do not correspond to static expressions.
|
||||||
|
|
||||||
procedure Eval_Real_Literal (N : Node_Id) is
|
procedure Eval_Real_Literal (N : Node_Id) is
|
||||||
begin
|
PK : constant Node_Kind := Nkind (Parent (N));
|
||||||
-- If the literal appears in a non-expression context, then it is
|
|
||||||
-- certainly appearing in a non-static context, so check it.
|
|
||||||
|
|
||||||
if Nkind (Parent (N)) not in N_Subexpr then
|
begin
|
||||||
|
-- If the literal appears in a non-expression context
|
||||||
|
-- and not as part of a number declaration, then it is
|
||||||
|
-- appearing in a non-static context, so check it.
|
||||||
|
|
||||||
|
if PK not in N_Subexpr and then PK /= N_Number_Declaration then
|
||||||
Check_Non_Static_Context (N);
|
Check_Non_Static_Context (N);
|
||||||
end if;
|
end if;
|
||||||
|
|
||||||
end Eval_Real_Literal;
|
end Eval_Real_Literal;
|
||||||
|
|
||||||
------------------------
|
------------------------
|
||||||
|
|
Loading…
Reference in New Issue