diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-08-01 15:17:35 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-08-01 15:17:35 +0000 |
commit | 231970144b7be5f624a8357dadd490160abbf6f0 (patch) | |
tree | d57f4216b88d82864aa55870fb9a13c1bf5de546 /gcc/ada/sem_ch11.adb | |
parent | 0a0eba553a97ad5d5c153bd1f0ad14f9a2efd5df (diff) | |
download | gcc-231970144b7be5f624a8357dadd490160abbf6f0.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@177047 138bc75d-0d04-0410-961f-82ee72b054a4
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 da7e05e3242..ce71e7fc91b 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; |