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.

Reply via email to