r256515 - in /trunk/gcc/ada: ChangeLog sem_ch10...

pmderodat@gcc.gnu.org pmderodat@gcc.gnu.org
Thu Jan 11 08:54:00 GMT 2018


Author: pmderodat
Date: Thu Jan 11 08:54:21 2018
New Revision: 256515

URL: https://gcc.gnu.org/viewcvs?rev=256515&root=gcc&view=rev
Log:
[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.

Modified:
    trunk/gcc/ada/ChangeLog
    trunk/gcc/ada/sem_ch10.adb



More information about the Gcc-cvs mailing list