summaryrefslogtreecommitdiff
path: root/gcc/ada/sem_ch5.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2011-08-01 16:05:30 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2011-08-01 16:05:30 +0000
commit0be73ed170f9ba2ad05cd6032202017b9d208eb9 (patch)
tree45e7af071813462b1f48c5c2fad29bd211f1f0f8 /gcc/ada/sem_ch5.adb
parentbd5dc4ecff8b81d9f2a9585286415fbf8a3835a0 (diff)
downloadgcc-0be73ed170f9ba2ad05cd6032202017b9d208eb9.tar.gz
2011-08-01 Yannick Moy <moy@adacore.com>
* par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character literal or operator symbol which is prefixed * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal mode on access attributes. * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check that concatenation operands are properly restricted in formal mode (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure Analyze_Concatenation_Operand. Issue an error in formal mode if the result of the concatenation has a type different from String. (Analyze_Conditional_Expression, Analyze_Explicit_Dereference, Analyze_Quantified_Expression, Analyze_Slice, Analyze_Null): issue an error in formal mode on unsupported constructs * sem_ch5.adb (Analyze_Block_Statement): only issue error on source block statement * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new function which returns the last node in a list of nodes for which Comes_From_Source returns True, if any * sem_ch6.adb (Check_Missing_Return): minor refactoring to use Last_Source_Node_In_Sequence * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming, Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal mode on unsupported constructs * sem_ch9.adb Do not return after issuing error in formal mode, as the rest of the actions may be needed later on since the error is marked as not serious. * sinfo.ads: Typos in comments. 2011-08-01 Pascal Obry <obry@adacore.com> * projects.texi: Minor editing. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@177057 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/sem_ch5.adb')
-rw-r--r--gcc/ada/sem_ch5.adb4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/ada/sem_ch5.adb b/gcc/ada/sem_ch5.adb
index e572aa20791..1673e5365ca 100644
--- a/gcc/ada/sem_ch5.adb
+++ b/gcc/ada/sem_ch5.adb
@@ -808,7 +808,9 @@ package body Sem_Ch5 is
begin
-- Block statement is not allowed in SPARK or ALFA
- if Formal_Verification_Mode then
+ if Formal_Verification_Mode
+ and then Comes_From_Source (N)
+ then
Error_Msg_F ("|~~block statement is not allowed", N);
end if;