[llvm-bugs] [Bug 44200] New: SmallVector.h(89): warning: offsetof applied to non-POD types is nonstandard

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Dec 2 02:01:23 PST 2019


https://bugs.llvm.org/show_bug.cgi?id=44200

            Bug ID: 44200
           Summary: SmallVector.h(89): warning: offsetof applied to
                    non-POD types is nonstandard
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: jascha at jawset.com
                CC: chandlerc at gmail.com, htmldeveloper at gmail.com,
                    llvm-bugs at lists.llvm.org

Emitted when compiling LLVM with clang.
Caused by offsetof(SmallVectorAlignmentAndSize<T>, FirstEl) when T is a non-POD
type.
Possible resolution: replace offsetof expression with
sizeof(std::aligned_storage_t<sizeof(SmallVectorBase), alignof(T)>)

-- 
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/20191202/53e7a932/attachment-0001.html>


More information about the llvm-bugs mailing list