summaryrefslogtreecommitdiff
path: root/gcc/ada/par-prag.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-prag.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-prag.adb')
-rw-r--r--gcc/ada/par-prag.adb16
1 files changed, 15 insertions, 1 deletions
diff --git a/gcc/ada/par-prag.adb b/gcc/ada/par-prag.adb
index 06c69747ec2..a421592ad84 100644
--- a/gcc/ada/par-prag.adb
+++ b/gcc/ada/par-prag.adb
@@ -306,7 +306,7 @@ begin
-- Ada_05/Ada_2005 --
---------------------
- -- This pragma must be processed at parse time, since we want to set
+ -- These pragmas must be processed at parse time, since we want to set
-- the Ada version properly at parse time to recognize the appropriate
-- Ada version syntax. However, it is only the zero argument form that
-- must be processed at parse time.
@@ -317,6 +317,18 @@ begin
Ada_Version_Explicit := Ada_05;
end if;
+ ---------------------
+ -- Ada_12/Ada_2012 --
+ ---------------------
+
+ -- These pragmas must be processed at parse time, since we want to set
+ -- the Ada version properly at parse time to recognize the appropriate
+ -- Ada version syntax.
+
+ when Pragma_Ada_12 | Pragma_Ada_2012 =>
+ Ada_Version := Ada_12;
+ Ada_Version_Explicit := Ada_12;
+
-----------
-- Debug --
-----------
@@ -374,8 +386,10 @@ begin
if Chars (Expression (Arg1)) = Name_On then
Extensions_Allowed := True;
+ Ada_Version := Ada_12;
else
Extensions_Allowed := False;
+ Ada_Version := Ada_Version_Explicit;
end if;
----------------