diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2011-08-01 17:17:35 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2011-08-01 17:17:35 +0200 |
commit | 38171f43f1339cf9d2f02ded8b41f5c4a3828b42 (patch) | |
tree | d57f4216b88d82864aa55870fb9a13c1bf5de546 /gcc/ada/sem_ch11.adb | |
parent | 1f25038381847b32fda35dd91ae0053635509a83 (diff) | |
download | gcc-38171f43f1339cf9d2f02ded8b41f5c4a3828b42.zip gcc-38171f43f1339cf9d2f02ded8b41f5c4a3828b42.tar.gz gcc-38171f43f1339cf9d2f02ded8b41f5c4a3828b42.tar.bz2 |
[multiple changes]
2011-08-01 Javier Miranda <miranda@adacore.com>
* sem_ch7.adb (Uninstall_Declarations): Remove useless code.
* einfo.ads (Access_Disp_Table): Fix documentation.
(Dispatch_Table_Wrappers): Fix documentation.
* einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
to enforce the documentation of this attribute.
(Set_Is_Interface): Cleanup the assertion.
* exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
the Underlying_Type entity before reading attribute Access_Disp_Table.
* exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
Locate the Underlying_Type before reading attribute Access_Disp_Table.
* exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
the Underlying_Type entity before reading attribute Access_Disp_Table.
* exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
Locate the Underlying_Type entity before reading attribute
Access_Disp_Table.
2011-08-01 Ed Schonberg <schonberg@adacore.com>
* s-poosiz.ads: Additional overriding indicators.
2011-08-01 Yannick Moy <moy@adacore.com>
* sem_ch5.adb (Analyze_Exit_Statement): add return after error in
formal mode.
(Analyze_Iteration_Scheme): issue error in formal mode when loop
parameter specification does not include a subtype mark.
* sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
formal mode on abstract subprogram.
(Analyze_Subprogram_Specification): issue error in formal mode on
user-defined operator.
(Process_Formals): issue error in formal mode on access parameter and
default expression.
* sem_ch9.adb (Analyze_Abort_Statement,
Analyze_Accept_Statement, Analyze_Asynchronous_Select,
Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
Analyze_Requeue, Analyze_Selective_Accept,
Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
* sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
issue error in formal mode on user-defined raise statement.
From-SVN: r177047
Diffstat (limited to 'gcc/ada/sem_ch11.adb')
-rw-r--r-- | gcc/ada/sem_ch11.adb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/ada/sem_ch11.adb b/gcc/ada/sem_ch11.adb index da7e05e..ce71e7f 100644 --- a/gcc/ada/sem_ch11.adb +++ b/gcc/ada/sem_ch11.adb @@ -441,6 +441,14 @@ package body Sem_Ch11 is P : Node_Id; begin + -- Raise statement is not allowed in SPARK or ALFA + + if Formal_Verification_Mode then + Formal_Error_Msg_N ("raise statement is not allowed", N); + end if; + + -- Proceed with analysis + Check_Unreachable_Code (N); -- Check exception restrictions on the original source @@ -607,6 +615,16 @@ package body Sem_Ch11 is -- Start of processing for Analyze_Raise_xxx_Error begin + -- Source-code raise statement is not allowed in SPARK or ALFA + + if Formal_Verification_Mode + and then Comes_From_Source (N) + then + Formal_Error_Msg_N ("raise statement is not allowed", N); + end if; + + -- Proceed with analysis + if No (Etype (N)) then Set_Etype (N, Standard_Void_Type); end if; |