-- in the expander that do not correspond to static expressions.
procedure Eval_Real_Literal (N : Node_Id) is
+ PK : constant Node_Kind := Nkind (Parent (N));
+
begin
- -- If the literal appears in a non-expression context, then it is
- -- certainly appearing in a non-static context, so check it.
+ -- 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 Nkind (Parent (N)) not in N_Subexpr then
+ if PK not in N_Subexpr and then PK /= N_Number_Declaration then
Check_Non_Static_Context (N);
end if;
-
end Eval_Real_Literal;
------------------------