diff options
author | Geert Bosch <bosch@adacore.com> | 2007-12-13 11:32:23 +0100 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2007-12-13 11:32:23 +0100 |
commit | a1980be8313c131ac0f97966e2574c88296a7669 (patch) | |
tree | 9242c3a355ff5ef2ef43c3642e829ccf5c343d22 | |
parent | d215a13cd9193b05072b0947c5b5d5101f615394 (diff) | |
download | gcc-a1980be8313c131ac0f97966e2574c88296a7669.zip gcc-a1980be8313c131ac0f97966e2574c88296a7669.tar.gz gcc-a1980be8313c131ac0f97966e2574c88296a7669.tar.bz2 |
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
-rw-r--r-- | gcc/ada/sem_eval.adb | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/gcc/ada/sem_eval.adb b/gcc/ada/sem_eval.adb index d3b2954..d7acaa7 100644 --- a/gcc/ada/sem_eval.adb +++ b/gcc/ada/sem_eval.adb @@ -2241,14 +2241,16 @@ package body Sem_Eval is -- 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; ------------------------ |