diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-10-10 13:17:07 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-10-10 13:17:07 +0000 |
commit | ec7d1375054c82ac0333096cf29eb816bbab26af (patch) | |
tree | 97f38666666d88b403845139074482f4255266f7 /gcc/ada/sem_ch11.adb | |
parent | 06c4e319994021930ee77bf79c5b79e63f4997ac (diff) | |
download | gcc-ec7d1375054c82ac0333096cf29eb816bbab26af.tar.gz |
2013-10-10 Robert Dewar <dewar@adacore.com>
* par-ch6.adb (Check_Junk_Semicolon_Before_Return): Remove
junk code.
2013-10-10 Javier Miranda <miranda@adacore.com>
* sem_ch13.adb (Freeze_Entity_Checks): Avoid
loosing errors on CPP entities in -gnatc mode.
2013-10-10 Robert Dewar <dewar@adacore.com>
* sem_ch5.adb (Analyze_If_Statement): Only diagnose redundant
if from source.
2013-10-10 Robert Dewar <dewar@adacore.com>
* restrict.adb (Check_SPARK_Restriction): Refine test (don't
automatically go to the original node).
* sem_ch11.adb (Analyze_Raise_Statement): Only raise
statements that come from source violate SPARK restrictions.
(Analyze_Raise_xxx_Error): Same fix.
* sem_ch3.adb (Analyze_Object_Declaration): Check OK SPARK
initialization on original node, not on possibly rewritten
expression.
* sem_ch4.adb (Analyze_If_Expression): Only if expressions that
come from source violate SPARK mode restrictions.
2013-10-10 Robert Dewar <dewar@adacore.com>
* gnat_ugn.texi: Fix confusing documentation for -gnatyM.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@203374 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/sem_ch11.adb')
-rw-r--r-- | gcc/ada/sem_ch11.adb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/gcc/ada/sem_ch11.adb b/gcc/ada/sem_ch11.adb index 180ecc6ca0b..c5b92e202c7 100644 --- a/gcc/ada/sem_ch11.adb +++ b/gcc/ada/sem_ch11.adb @@ -489,7 +489,10 @@ package body Sem_Ch11 is Par : Node_Id; begin - Check_SPARK_Restriction ("raise statement is not allowed", N); + if Comes_From_Source (N) then + Check_SPARK_Restriction ("raise statement is not allowed", N); + end if; + Check_Unreachable_Code (N); -- Check exception restrictions on the original source @@ -687,7 +690,9 @@ package body Sem_Ch11 is -- Start of processing for Analyze_Raise_xxx_Error begin - Check_SPARK_Restriction ("raise statement is not allowed", N); + if Nkind (Original_Node (N)) = N_Raise_Statement then + Check_SPARK_Restriction ("raise statement is not allowed", N); + end if; if No (Etype (N)) then Set_Etype (N, Standard_Void_Type); |