[LLVMbugs] [Bug 13009] New: Missing warning on the visibility of bases and members

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Jun 1 14:24:46 PDT 2012


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

             Bug #: 13009
           Summary: Missing warning on the visibility of bases and members
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: All
            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


Newer gccs produce a warning in

struct __attribute__((visibility("hidden"))) foo {
};
struct bar {
  foo x; // bar has default visibility, but foo is hidden
};
struct zed : public foo { // zed has default visibility, but foo is hidden
};

I think it is a reasonable warning because

* If the type has a hidden member or base, that member or base was created
locally (in the same DSO), so the type could also be hidden.
* If there is something strange going on, the warning is really easy to avoid,
just make the visibility of bar and zed explicit.

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