[LLVMbugs] [Bug 12671] New: "using declaration referring to inaccessible member...is a Microsoft compatibility extension" fires on valid code

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Apr 25 21:15:16 PDT 2012


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

             Bug #: 12671
           Summary: "using declaration referring to inaccessible
                    member...is a Microsoft compatibility extension" fires
                    on valid code
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: nicolasweber at gmx.de
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified


tests-MacBook-Pro-2:delta test$ cat repro.ii
template<typename T>
class TreeShared {
 public:
  T* parent() const { return 0; }
};

class Node : public TreeShared<int> {
 private:
  using TreeShared<int>::parent;
  inline void* parentNode() const {
    return parent();
  }
};

# Note: Builds fine with "normal" clang.
tests-MacBook-Pro-2:delta test$ $CLANG -fsyntax-only -Wno-c++11-extensions
repro.ii

# But with a win32 target, it warns:
tests-MacBook-Pro-2:delta test$ $CLANG -target i686-pc-win32 -fsyntax-only
-Wno-c++11-extensions repro.ii
repro.ii:11:12: warning: using declaration referring to inaccessible member
'Node::parent' (which refers to accessible member 'TreeShared<int>::parent') is
a Microsoft
      compatibility extension [-Wmicrosoft]
    return parent();
           ^
1 warning generated.

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