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++/19709] New: name lookup broken?


[forwarded from http://bugs.debian.org/294973]


the following code is accepted by g++-3.x, not by g++-4.0:


struct A {};

namespace Boo
{
struct B
{
    friend struct A;

    B(const A&) {};
};
}

int main()
{
    A a;
    Boo::B b(a);
    return 0;
}

$ g++-4.0 bug-294973.cc
bug-294973.cc: In function 'int main()':
bug-294973.cc:16: error: no matching function for call to 'Boo::B::B(A&)'
bug-294973.cc:9: note: candidates are: Boo::B::B(const Boo::A&)
bug-294973.cc:6: note:                 Boo::B::B(const Boo::B&)

-- 
           Summary: name lookup broken?
           Product: gcc
           Version: 3.3.6
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: debian-gcc at lists dot debian dot org
                CC: gcc-bugs at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19709


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