diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2011-08-01 18:05:30 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2011-08-01 18:05:30 +0200 |
commit | 1d801f212f02cc2f62cfae39ce23589f645828df (patch) | |
tree | 45e7af071813462b1f48c5c2fad29bd211f1f0f8 /gcc/ada/par-ch4.adb | |
parent | 53beff22220d9c1dd48c022f81e61e74a3084c34 (diff) | |
download | gcc-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/par-ch4.adb')
-rw-r--r-- | gcc/ada/par-ch4.adb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/ada/par-ch4.adb b/gcc/ada/par-ch4.adb index 74ab760..338ee64 100644 --- a/gcc/ada/par-ch4.adb +++ b/gcc/ada/par-ch4.adb @@ -209,8 +209,21 @@ package body Ch4 is -- designator. if Token not in Token_Class_Desig then + + -- Selector name cannot be a character literal in SPARK + + if SPARK_Mode and then Token = Tok_Char_Literal then + Error_Msg_SC ("|~~character literal cannot be prefixed"); + end if; + goto Scan_Name_Extension_Dot; else + -- Selector name cannot be an operator symbol in SPARK + + if SPARK_Mode and then Token = Tok_Operator_Symbol then + Error_Msg_SC ("|~~operator symbol cannot be prefixed"); + end if; + Prefix_Node := Name_Node; Name_Node := New_Node (N_Selected_Component, Prev_Token_Ptr); Set_Prefix (Name_Node, Prefix_Node); |