diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-07-09 10:50:32 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-07-09 10:50:32 +0000 |
commit | 6b34a333d2e034341473e39191d15cde9ab5d389 (patch) | |
tree | 8050d0260ecd2fab9b992c1040b1f8c709065f48 /gcc/ada/sem_cat.adb | |
parent | 960a0aad5d0439ccfd4b3ac58f503c75511e19af (diff) | |
download | gcc-6b34a333d2e034341473e39191d15cde9ab5d389.tar.gz |
2012-07-09 Robert Dewar <dewar@adacore.com>
* freeze.adb, prj-util.adb, prj-util.ads, sem_ch13.adb: Minor
reformatting.
2012-07-09 Gary Dismukes <dismukes@adacore.com>
* sem_cat.adb (Check_Categorization_Dependencies):
Allow dependence of both Remote_Types and Remote_Call_Interface
declarations (not just Remote_Types units) on preelaborated
units, but require that the dependence be made via a private
with_clause. Issue a specialized error message.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@189371 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/sem_cat.adb')
-rw-r--r-- | gcc/ada/sem_cat.adb | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/gcc/ada/sem_cat.adb b/gcc/ada/sem_cat.adb index e53645e45de..e5d4dfbadda 100644 --- a/gcc/ada/sem_cat.adb +++ b/gcc/ada/sem_cat.adb @@ -219,10 +219,14 @@ package body Sem_Cat is then null; - -- Special case: Remote_Types can depend on Preelaborated per - -- Ada 2005 AI 0206. - - elsif Unit_Category = Remote_Types + -- Special case: Remote_Types and Remote_Call_Interface declarations + -- can depend on a preelaborated unit via a private with_clause, per + -- AI05-0206. + + elsif (Unit_Category = Remote_Types + or else Unit_Category = Remote_Call_Interface) + and then (Nkind (N) = N_With_Clause + and then Private_Present (N)) and then Is_Preelaborated (Depended_Entity) then null; @@ -263,6 +267,17 @@ package body Sem_Cat is then return; + -- Dependence of Remote_Types or Remote_Call_Interface declaration + -- on a preelaborated unit with a normal with_clause. + + elsif (Unit_Category = Remote_Types + or else Unit_Category = Remote_Call_Interface) + and then Is_Preelaborated (Depended_Entity) + then + Error_Msg_NE + ("<must use private with clause for preelaborated unit& ", + N, Depended_Entity); + -- Subunit case elsif Is_Subunit then |