[Ada] Bad "already use-visible" warning re: use in private part

Pierre-Marie de Rodat derodat@adacore.com
Wed Dec 18 07:28:00 GMT 2019


This patch fixes a bug in which if a parent package has a use clause in
its private part, and a child of that parent has a use clause for the
same thing in its context clause, the compiler incorrectly warns that
the one in the child is redundant.

Tested on x86_64-pc-linux-gnu, committed on trunk

2019-12-18  Bob Duff  <duff@adacore.com>

gcc/ada/

	* sem_ch8.adb (Note_Redundant_Use): It was already checking for
	a use clause in the visible part of the child. Add an additional
	check for a use clause in the context clause of the child.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: text/x-diff
Size: 1282 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20191218/eaf67918/attachment.bin>


More information about the Gcc-patches mailing list