[Bug c++/58053] New: Bogus "error ... is private ... within this context"
ppluzhnikov at google dot com
gcc-bugzilla@gcc.gnu.org
Fri Aug 2 05:28:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58053
Bug ID: 58053
Summary: Bogus "error ... is private ... within this context"
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: ppluzhnikov at google dot com
Test case:
class Foo {
struct Bar { };
friend class F;
};
class F
#ifdef BUG
: public Foo::Bar
#endif
{
void Fn() { Foo::Bar b; }
};
Using "g++ (GCC) 4.9.0 20130730 (experimental)", the test compiles (clearly
Foo::Bar is accessible to F::Fn()), but fails with -DBUG:
t.cc:2:10: error: ‘struct Foo::Bar’ is private
struct Bar { };
^
t.cc:8:17: error: within this context
: public Foo::Bar
^
More information about the Gcc-bugs
mailing list