[LLVMbugs] [Bug 11721] New: accepts invalid with forward declaration in a anonymous namespace

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Jan 6 18:41:45 PST 2012


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

             Bug #: 11721
           Summary: accepts invalid with forward declaration in a
                    anonymous namespace
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: rafael.espindola at gmail.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified


clang accepts, but GCC and Comeau reject:

namespace{
  class bar;
}
class foo {
  friend class bar;
  void f();
};
namespace {
  class bar : public foo {
    void g(foo *p) {
      p->f();
    }
  };
}

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