This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug ada/15610] New: Illegal program not detected, generic formal parameter hides declared item
- 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: 23 May 2004 09:42:13 -0000
- Subject: [Bug ada/15610] New: Illegal program not detected, generic formal parameter hides declared item
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
procedure Test_244942 is
function f1 return integer is begin return 1; end f1;
generic
with function foo return integer;
package pak1 is
type color is (foo);
end pak1;
package new_pak1 is new pak1(f1);
i: integer := new_pak1.foo; -- ERROR: integer vs. color
begin
null;
end Test_244942;
The compiler says nothing.
--
Summary: Illegal program not detected, generic formal parameter
hides declared item
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
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15610