aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_attr.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2011-08-01 18:05:30 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2011-08-01 18:05:30 +0200
commit1d801f212f02cc2f62cfae39ce23589f645828df (patch)
tree45e7af071813462b1f48c5c2fad29bd211f1f0f8 /gcc/ada/sem_attr.adb
parent53beff22220d9c1dd48c022f81e61e74a3084c34 (diff)
downloadgcc-1d801f212f02cc2f62cfae39ce23589f645828df.zip
gcc-1d801f212f02cc2f62cfae39ce23589f645828df.tar.gz
gcc-1d801f212f02cc2f62cfae39ce23589f645828df.tar.bz2
[multiple changes]
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. From-SVN: r177057
Diffstat (limited to 'gcc/ada/sem_attr.adb')
-rw-r--r--gcc/ada/sem_attr.adb8
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb
index 1b6d3ef..f2556a7 100644
--- a/gcc/ada/sem_attr.adb
+++ b/gcc/ada/sem_attr.adb
@@ -565,6 +565,14 @@ package body Sem_Attr is
-- Start of processing for Analyze_Access_Attribute
begin
+ -- Access attribute is not allowed in SPARK or ALFA
+
+ if Formal_Verification_Mode and then Comes_From_Source (N) then
+ Error_Attr_P ("|~~% attribute is not allowed");
+ end if;
+
+ -- Proceed with analysis
+
Check_E0;
if Nkind (P) = N_Character_Literal then