[LLVMbugs] [Bug 19140] New: protected typedef not accessible in derived class

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Mar 14 03:52:26 PDT 2014


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

            Bug ID: 19140
           Summary: protected typedef not accessible in derived class
           Product: clang
           Version: 3.4
          Hardware: Macintosh
                OS: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: sebastian at theophil.net
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

The following code snippet does not compile using clang but according to the
standard it is valid: 

class A {
     protected:
         struct B { };
};

struct D: A::B, A { };

clang fails with "error: 'B' is a protected member of 'A'" 

According to the current standard
(http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3337.pdf), this is
valid  because 

"the use of A::B as a base-specifier is well-formed because D is derived from
A, so checking of base-specifiers must be deferred until the entire
base-specifier-list has been seen."

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20140314/1edb21ea/attachment.html>


More information about the llvm-bugs mailing list