[Bug c++/59256] qualified name in friend function declaration doesn't match previous declaration in inline namespace
jason at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Mar 26 16:14:00 GMT 2015
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.
More information about the Gcc-bugs
mailing list