This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug ada/17320] New: Illegal program not detected, name hidden by use clauses, RM 3.9.3(11)
- From: "ludovic dot brenta at insalien dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 4 Sep 2004 13:53:43 -0000
- Subject: [Bug ada/17320] New: Illegal program not detected, name hidden by use clauses, RM 3.9.3(11)
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
(Debian bug #269948)
-- RM 3.9.3/11 A generic actual subprogram shall not be an abstract
-- subprogram. works OK if unrelated line (A) is commented out.
package Test_269948 is
generic
with function "=" (X, Y : integer) return Boolean is <>; --(A)
package pak1 is
function "=" (X, Y: float) return Boolean is abstract;
generic
with function Equal (X, Y : float) return Boolean is "="; --ERROR:
package pak2 is
end pak2;
end pak1;
package new_pak1 is new pak1;
package new_pak2 is new new_pak1.pak2;
end Test_269948;
The above program compiles without an error with GNAT 3.15p and GCC
3.4. The compiler should instead print something like:
test_269948.ads:15:04: abstract subprogram not allowed as generic actual
gnatmake: "test_119.ads" compilation error
--
Summary: Illegal program not detected, name hidden by use
clauses, RM 3.9.3(11)
Product: gcc
Version: 3.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: ada
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: ludovic dot brenta at insalien dot org
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17320