[LLVMbugs] [Bug 9564] New: clang c++ allows taking address of bitfield using reinterpret_cast

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Mar 25 20:35:30 PDT 2011


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

           Summary: clang c++ allows taking address of bitfield using
                    reinterpret_cast
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: sharparrow1 at yahoo.com
                CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com


Testcase:
struct a { int a : 10; }; a x;
int *y = &reinterpret_cast<int&>(x.a);

The reinterpret_cast should be rejected.

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