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++/59256] qualified name in friend function declaration doesn't match previous declaration in inline namespace


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59256

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |NEW
           Assignee|jason at gcc dot gnu.org           |unassigned at gcc dot gnu.org

--- Comment #4 from Jason Merrill <jason at gcc dot gnu.org> ---
A related testcase:

inline namespace A {
  void f();
}

class B
{
  B();
  friend void ::f();
};

void A::f() { B b; }

int main()
{
  f();
}

It turns out that friend matching code doesn't support inline namespaces very
thoroughly.  set_decl_namespace handles this sort of thing for some cases, but
it punts on templates and then tsubst_friend_function doesn't do anything about
inline namespaces.

But this is too complicated to fix for GCC 5, so I'm unassigning myself.


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