diff options
author | Yannick Moy <moy@adacore.com> | 2014-08-04 08:01:36 +0000 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2014-08-04 10:01:36 +0200 |
commit | 3dd7e28d9fdd0210987e9281f158bd97db4e1f06 (patch) | |
tree | 608f376f517d2d6bd7075697e85218cb0a4b1974 /gcc/ada/sem.adb | |
parent | 6c56d9b8a6716973e5fbba1dc5e38507022b6006 (diff) | |
download | gcc-3dd7e28d9fdd0210987e9281f158bd97db4e1f06.zip gcc-3dd7e28d9fdd0210987e9281f158bd97db4e1f06.tar.gz gcc-3dd7e28d9fdd0210987e9281f158bd97db4e1f06.tar.bz2 |
sem.adb, sem.ads (In_Default_Expr): Global flag that is set to True during analysis of a default component expression.
2014-08-04 Yannick Moy <moy@adacore.com>
* sem.adb, sem.ads (In_Default_Expr): Global flag that is set
to True during analysis of a default component expression.
(Semantics): Save and restore In_Default_Expr around analysis.
* sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration):
Call new wrapper Preanalyze_Default_Expression.
(Preanalyze_Default_Expression): New wrapper on
Preanalyze_Spec_Expression which sets and restores In_Default_Expr.
* sem_res.adb (Resolve_Call): Mark calls inside default
expressions as not inlined in GNATprove mode.
From-SVN: r213536
Diffstat (limited to 'gcc/ada/sem.adb')
-rw-r--r-- | gcc/ada/sem.adb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/ada/sem.adb b/gcc/ada/sem.adb index 73f345e..f1dd366 100644 --- a/gcc/ada/sem.adb +++ b/gcc/ada/sem.adb @@ -1309,6 +1309,7 @@ package body Sem is S_GNAT_Mode : constant Boolean := GNAT_Mode; S_Global_Dis_Names : constant Boolean := Global_Discard_Names; S_In_Assertion_Expr : constant Nat := In_Assertion_Expr; + S_In_Default_Expr : constant Boolean := In_Default_Expr; S_In_Spec_Expr : constant Boolean := In_Spec_Expression; S_Inside_A_Generic : constant Boolean := Inside_A_Generic; S_Outer_Gen_Scope : constant Entity_Id := Outer_Generic_Scope; @@ -1442,6 +1443,7 @@ package body Sem is Full_Analysis := True; Inside_A_Generic := False; In_Assertion_Expr := 0; + In_Default_Expr := False; In_Spec_Expression := False; Set_Comes_From_Source_Default (False); @@ -1525,6 +1527,7 @@ package body Sem is Global_Discard_Names := S_Global_Dis_Names; GNAT_Mode := S_GNAT_Mode; In_Assertion_Expr := S_In_Assertion_Expr; + In_Default_Expr := S_In_Default_Expr; In_Spec_Expression := S_In_Spec_Expr; Inside_A_Generic := S_Inside_A_Generic; Outer_Generic_Scope := S_Outer_Gen_Scope; |