summaryrefslogtreecommitdiff
path: root/gcc/ada/par-ch3.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2010-06-23 09:53:24 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2010-06-23 09:53:24 +0000
commit5779992c5ea21eb32a3c7942e76fc79763436013 (patch)
tree682a591ce203dec73771dbec80125a9be4066201 /gcc/ada/par-ch3.adb
parent375329af2b53362b28a81f065697d0599b8934cc (diff)
downloadgcc-5779992c5ea21eb32a3c7942e76fc79763436013.tar.gz
2010-06-23 Eric Botcazou <ebotcazou@adacore.com>
* exp_ch11.adb (Expand_Local_Exception_Handlers): Propagate the end label to the new sequence of statements. Set the sloc of the raise statement onto the new goto statements. 2010-06-23 Robert Dewar <dewar@adacore.com> * a-stuten.ads, a-stuten.adb: New files. * impunit.adb: Add engtry for Ada.Strings.UTF_Encoding (a-stuten.ads) * Makefile.rtl: Add entry for a-stuten (Ada.Strings.UTF_Encoding) 2010-06-23 Robert Dewar <dewar@adacore.com> * gnat_ugn.texi: Add documentation of -gnat12 switch Add documentation of -gnatX switch. 2010-06-23 Ed Schonberg <schonberg@adacore.com> * inline.ads: Include the current Ada_Version in the info for pending instance bodies, so that declaration and body are compiled with the same Ada_Version. * inline.adb: Move with_clause for Opt to spec. * sem_ch12.adb (Analyze_Package_Instantiation, Analyze_Subprogram_Instantiation): Save current Ada_Version in Pending_Instantiation information. (Instantiate_Package_Body, Instantiate_Subprogram_Body, Inline_Package_Body): Use the Ada_Version present in the body information. 2010-06-23 Robert Dewar <dewar@adacore.com> * usage.adb: Add documentation for -gnat12 switch. * errout.ads: Add VMS alias entry for -gnat12 switch * gnat_rm.texi: Add documentation for pragma Ada_12 and Ada_2012 Add documentation for pragma Extensions_Allowed. * opt.ads: Add entry for Ada 2012 mode. * sem_ch4.adb, par-ch3.adb, par-ch4.adb: Use new Ada 2012 mode for 2012 features. * sem_prag.adb, par-prag.adb: Add processing for pragma Ada_12 and Ada_2012. * sem_ch13.adb: Add handling for Ada 2012 mode. * snames.ads-tmpl: Add entries for pragma Ada_2012 and Ada_12. * switch-c.adb: Add handling for -gnat12 switch. Implement -gnat2005 and -gnat2012. * usage.adb: Add documentation for -gnat12 switch. * vms_data.ads: Add /12 switch for Ada 2012 mode. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@161268 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/par-ch3.adb')
-rw-r--r--gcc/ada/par-ch3.adb15
1 files changed, 7 insertions, 8 deletions
diff --git a/gcc/ada/par-ch3.adb b/gcc/ada/par-ch3.adb
index 5285e8fdf87..d1bc039b969 100644
--- a/gcc/ada/par-ch3.adb
+++ b/gcc/ada/par-ch3.adb
@@ -124,9 +124,8 @@ package body Ch3 is
elsif Nkind_In (N, N_In, N_Not_In)
and then Paren_Count (N) = 0
then
- Error_Msg_N ("|this expression must be parenthesized!", N);
Error_Msg_N
- ("\|since extensions (and set notation) are allowed", N);
+ ("|this expression must be parenthesized in Ada 2012 mode!", N);
end if;
end Check_Restricted_Expression;
@@ -3663,10 +3662,10 @@ package body Ch3 is
-- Expression
else
- -- If extensions are permitted then the expression must be a
- -- simple expression. The resaon for this restriction (i.e.
- -- going back to the Ada 83 rule) is to avoid ambiguities
- -- when set membership operations are allowed, consider the
+ -- In Ada 2012 mode, the expression must be a simple
+ -- expression. The resaon for this restriction (i.e. going
+ -- back to the Ada 83 rule) is to avoid ambiguities when set
+ -- membership operations are allowed, consider the
-- following:
-- when A in 1 .. 10 | 12 =>
@@ -3679,12 +3678,12 @@ package body Ch3 is
-- when (A in 1 .. 10 | 12) =>
-- when (A in 1 .. 10) | 12 =>
- -- To solve this, if extensins are enabled, we disallow
+ -- To solve this, in Ada 2012 mode, we disallow
-- the use of membership operations in expressions in
-- choices. Technically in the grammar, the expression
-- must match the grammar for restricted expression.
- if Extensions_Allowed then
+ if Ada_Version >= Ada_12 then
Check_Restricted_Expression (Expr_Node);
-- In Ada 83 mode, the syntax required a simple expression