Skip to content
Snippets Groups Projects
Commit 070f973c authored by Bob Duff's avatar Bob Duff Committed by Marc Poulhiès
Browse files

ada: Reject use-clause conflicts in the run-time library

This patch fixes a bug where GNAT would fail to detect certain
errors when compiling the run-time library.  In particular, if
two overloaded homographs are both directly visible, it would
pick one, rather than complaining about the ambiguity.

The problem was that some special-purpose code in Sem_Ch8 was trying
to make a user name take precedence over some run-time library
declaration that (incorrectly) appears to be visible because of
rtsfind. The solution is to disable that code while compiling
the run-time library itself.

In addition, we fix the newly-found errors in the run-time library.

gcc/ada/

	* sem_ch8.adb (Find_Direct_Name): Disable the special-purpose code
	when we are actually compiling the run-time library itself.
	* libgnarl/a-exetim__posix.adb: Fix newly-found use-clause
	conflicts.
	* libgnat/a-direct.adb: Likewise.
	* libgnat/a-nbnbin.adb: Likewise.
	* libgnat/a-timoio__128.adb: Likewise.
	* libgnat/a-timoio.adb: Likewise.
	* libgnat/a-wtmoio__128.adb: Likewise.
	* libgnat/a-wtmoio.adb: Likewise.
	* libgnat/a-ztmoio__128.adb: Likewise.
	* libgnat/a-ztmoio.adb: Likewise.
parent 0c56fd6a
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment