This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/1016] [DR 166] friend class declarations not observing namespace rules.


------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]