This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/34827] New: Weird name-lookup error
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 17 Jan 2008 12:52:13 -0000
- Subject: [Bug c++/34827] New: Weird name-lookup error
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
template <typename T>
struct Foo
{
template <typename Z>
friend void func(const Foo &);
};
void check(const Foo<int> & x)
{
Foo<int> weird;
func<int>(x);
}
func is incorrectly found by name-lookup. If you delete the
declaration of weird the program is rejected as it should.
Maybe we are confused by applying argument dependent name-lookup
here?
--
Summary: Weird name-lookup error
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Keywords: accepts-invalid
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: rguenth at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34827