This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/34827] New: Weird name-lookup error


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]