summaryrefslogtreecommitdiff
path: root/gcc/ada/par-ch5.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2011-08-01 15:54:39 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2011-08-01 15:54:39 +0000
commite5d3809518f21782142f679e36c901e6da9ba9b8 (patch)
tree3c38c0199334e35cf3e0d160332ebaf82e8c988d /gcc/ada/par-ch5.adb
parent3f42e2a77bb6c09ed2e47542cc32369e93f315a4 (diff)
downloadgcc-e5d3809518f21782142f679e36c901e6da9ba9b8.tar.gz
2011-08-01 Yannick Moy <moy@adacore.com>
* sem_util.adb (Enter_Name): issue error in formal mode on declaration of homonym, unless the homonym is one of the cases allowed in SPARK * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for package declaration occurring after a body. 2011-08-01 Robert Dewar <dewar@adacore.com> * checks.adb, exp_ch4.adb: Minor reformatting. 2011-08-01 Javier Miranda <miranda@adacore.com> * einfo.ads (Access_Disp_Table): Fix documentation. (Dispatch_Table_Wrappers): Fix documentation. 2011-08-01 Pascal Obry <obry@adacore.com> * prj-env.adb, prj-env.ads: Minor reformatting. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@177053 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/par-ch5.adb')
-rw-r--r--gcc/ada/par-ch5.adb6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/ada/par-ch5.adb b/gcc/ada/par-ch5.adb
index acea49b7445..9a390ab03a0 100644
--- a/gcc/ada/par-ch5.adb
+++ b/gcc/ada/par-ch5.adb
@@ -2114,6 +2114,8 @@ package body Ch5 is
-- The same is true for the SPARK mode: although SPARK 95 removes
-- the distinction between initial and later declarative items,
-- the distinction remains in the Examiner. (JB01-005)
+ -- Note that the Examiner does not count package declarations in later
+ -- declarative items.
if Ada_Version = Ada_83 or else SPARK_Mode then
Decl := First (Decls);
@@ -2135,7 +2137,9 @@ package body Ch5 is
Body_Sloc := Sloc (Decl);
Inner : while Present (Decl) loop
- if Nkind (Decl) not in N_Later_Decl_Item
+ if (Nkind (Decl) not in N_Later_Decl_Item
+ or else (SPARK_Mode
+ and then Nkind (Decl) = N_Package_Declaration))
and then Nkind (Decl) /= N_Pragma
then
if Ada_Version = Ada_83 then