[Bug c++/14281] Regression in v3.4: friend class not working
s_gccbugzilla at nedprod dot com
gcc-bugzilla@gcc.gnu.org
Wed Feb 25 03:29:00 GMT 2004
------- Additional Comments From s_gccbugzilla at nedprod dot com 2004-02-25 03:29 -------
(In reply to comment #3)
> Here's a minimal testcase showing the problem.
> I guess, gcc is actually right when rejecting the code
> (it does so since 3.3), but I'm not sure.
>
> =====================================================
> template <typename T> struct A : public T::X {};
>
> class B
> {
> template <typename> friend class A;
> struct X {};
> };
>
> A<B> a;
> =====================================================
>
This is it in one. Now seeing as you guys are the experts, does inheriting off
something observe that something's friend rules? ie; does the class begin before
inheriting or after?
I should add I tested against v3.2 where it does work, not v3.3 which dies with
certain code sequences in my code so I tend to avoid it (v3.4 has them fixed so
I haven't reported these).
Cheers,
Niall
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14281
More information about the Gcc-bugs
mailing list