diff options
author | pmderodat <pmderodat@138bc75d-0d04-0410-961f-82ee72b054a4> | 2018-01-11 08:54:21 +0000 |
---|---|---|
committer | pmderodat <pmderodat@138bc75d-0d04-0410-961f-82ee72b054a4> | 2018-01-11 08:54:21 +0000 |
commit | 854e93fdd6431dfbd2b0869fc52e8b2793aa0173 (patch) | |
tree | 7ee34e20519b550c87b04b34d832978dd6e02a59 /gcc/ada/ChangeLog | |
parent | 3e406e6ddeeba9716022bf9a9ec3a20f1daa443a (diff) |
[Ada] Incorrect diagnostic on illegal with clause
This patch updates the detection of illegal with clauses which import private
child packages to properly detect a grandchild of Ada.
------------
-- Source --
------------
-- fake.ads
package Fake is
end Fake;
-- fake-ada.ads
package Fake.Ada is
end Fake.Ada;
-- fake-ada-text_io.ads
package Fake.Ada.Text_IO is
end Fake.Ada.Text_IO;
-- fake-ada-text_io-float_io.ads
private generic
type Num is digits <>;
package Fake.Ada.Text_IO.Float_IO is
end Fake.Ada.Text_IO.Float_IO;
-- fake-float_io.ads
private generic
type Num is digits <>;
package Fake.Float_IO is
end Fake.Float_IO;
-- main.ads
with Fake.Ada.Text_IO.Float_IO;
with Fake.Float_IO;
package Main is
end Main;
----------------------------
-- Compilation and output --
----------------------------
$ gcc -c main.ads
main.ads:1:06: unit in with clause is private child unit
main.ads:1:06: current unit must also have parent "Text_IO"
main.ads:2:06: unit in with clause is private child unit
main.ads:2:06: current unit must also have parent "Fake"
2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
gcc/ada/
* sem_ch10.adb (Check_Private_Child_Unit): Ensure that the enclosing
scope of package Ada is Standard.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@256515 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/ChangeLog')
-rw-r--r-- | gcc/ada/ChangeLog | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index e81b9bf1ee6..2bc53d7f8dc 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,8 @@ +2018-01-11 Hristian Kirtchev <kirtchev@adacore.com> + + * sem_ch10.adb (Check_Private_Child_Unit): Ensure that the enclosing + scope of package Ada is Standard. + 2018-01-11 Ed Schonberg <schonberg@adacore.com> * sem_ch13.adb (Replace_Type_Ref): Handle properly reference to a |