[LLVMbugs] [Bug 6759] "friend class" implies forward declaration "class"?

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Apr 1 14:48:20 PDT 2010


http://llvm.org/bugs/show_bug.cgi?id=6759

Douglas Gregor <dgregor at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID

--- Comment #1 from Douglas Gregor <dgregor at apple.com> 2010-04-01 16:48:19 CDT ---
Clang is correct here, per C+ [11.4]p9:

  For a friend class declaration, if there is no prior declaration, the class
that is specified belongs to the innermost enclosing non-class scope, but if it
is subsequently referenced, its name is not found by name lookup until a
matching declaration is provided in the innermost enclosing nonclass scope.

GCC is wrong to make FooImpl visible in the friend class declaration.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list