diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-09-10 15:21:28 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-09-10 15:21:28 +0000 |
commit | 8b6fb1f0cf8175ad979dd7cf1b884700bd3b7a0d (patch) | |
tree | 2aa1248d70e80464bb18ab1104c8321f79d18735 /gcc/ada/par-ch12.adb | |
parent | 39aa587b61c8163166c1ca91e8dd1aba2076276f (diff) | |
download | gcc-8b6fb1f0cf8175ad979dd7cf1b884700bd3b7a0d.tar.gz |
2013-09-10 Robert Dewar <dewar@adacore.com>
* sinput.adb (Check_For_BOM): Avoid reading past end of file.
2013-09-10 Robert Dewar <dewar@adacore.com>
* errout.adb (Error_Msg_Ada_2012_Feature): New procedure.
* errout.ads (Error_Msg_Ada_2012_Feature): New procedure.
* inline.ads: Save/Restore Ada_Version_Pragma.
* opt.adb: Save/Restore Ada_Version_Pragma.
* opt.ads (Ada_Version_Pragma): New variable.
* par-ch11.adb, par-ch12.adb, par-ch13.adb, par-ch4.adb, par-ch5.adb,
par-ch6.adb, par-ch8.adb, par-prag.adb: Use Error_Msg_Ada_2012_Feature.
* prj.adb: Initialize Ada_Version_Pragma.
* sem_attr.adb: Use Error_Msg_Ada_2012_Feature.
* sem_ch12.adb, sem_ch8.adb: Save/restore Ada_Version_Pragma.
* sem_prag.adb (Analyze_Pragma, cases Ada_xx): Set Ada_Version_Pragma.
* switch-c.adb: Initialize Ada_Version_Pragma.
* sem_ch12.adb: Minor reformatting.
2013-09-10 Ed Schonberg <schonberg@adacore.com>
* sem_ch3.adb (Process_Subtype): Discard constraint on access
to class-wide type. Such constraints are not supported and are
considered a language pathology.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202466 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/par-ch12.adb')
-rw-r--r-- | gcc/ada/par-ch12.adb | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/gcc/ada/par-ch12.adb b/gcc/ada/par-ch12.adb index ed6e314dca0..cf75f04fa15 100644 --- a/gcc/ada/par-ch12.adb +++ b/gcc/ada/par-ch12.adb @@ -546,12 +546,8 @@ package body Ch12 is Scan; -- past semicolon - if Ada_Version < Ada_2012 then - Error_Msg_N - ("`formal incomplete type` is an Ada 2012 feature", Decl_Node); - Error_Msg_N - ("\unit must be compiled with -gnat2012 switch", Decl_Node); - end if; + Error_Msg_Ada_2012_Feature + ("formal incomplete type", Sloc (Decl_Node)); Set_Formal_Type_Definition (Decl_Node, @@ -564,13 +560,9 @@ package body Ch12 is Def_Node := P_Formal_Type_Definition; - if Nkind (Def_Node) = N_Formal_Incomplete_Type_Definition - and then Ada_Version < Ada_2012 - then - Error_Msg_N - ("`formal incomplete type` is an Ada 2012 feature", Decl_Node); - Error_Msg_N - ("\unit must be compiled with -gnat2012 switch", Decl_Node); + if Nkind (Def_Node) = N_Formal_Incomplete_Type_Definition then + Error_Msg_Ada_2012_Feature + ("formal incomplete type", Sloc (Decl_Node)); end if; if Def_Node /= Error then |