[Bug c++/1016] [DR 166] friend class declarations not observing namespace rules.
reichelt at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Fri Nov 26 16:32:00 GMT 2004
------- Additional Comments From reichelt at gcc dot gnu dot org 2004-11-26 16:31 -------
Kriang, according to your comment in #6 the original example should
compile, right?
And the following example should generate an error in line 12 since
the global class b is not a friend of foo::a, right?
=====================================
class b { void bar(); };
namespace foo
{
class a
{
friend class b;
b b_;
};
}
void b::bar() { foo::a().b_; }
=====================================
In this case we have a rejects-valid on mainline for the example in
comment #1. And an accepts-invalid for the example in this comment
for gcc 2.95.3 - 3.4.3.
--
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |rejects-valid
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=1016
More information about the Gcc-bugs
mailing list