[llvm-bugs] [Bug 37944] New: ItaniumDemangle - struct Db alignment warnings

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Jun 26 07:13:56 PDT 2018


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

            Bug ID: 37944
           Summary: ItaniumDemangle - struct Db alignment warnings
           Product: new-bugs
           Version: unspecified
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: llvm-dev at redking.me.uk
                CC: erik.pilkington at gmail.com, i at maskray.me,
                    llvm-bugs at lists.llvm.org, maskray at google.com,
                    sepavloff at gmail.com

MSVC is warning of alignment issues in the code:

ItaniumPartialDemangler::ItaniumPartialDemangler()
    : RootNode(nullptr), Context(new Db{nullptr, nullptr}) {}

C:\ps4-buildslave2\llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast\llvm.src\lib\Demangle\ItaniumDemangle.cpp(5164):
warning C4316: '`anonymous-namespace'::Db': object allocated on the heap may
not be aligned 16

http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast/builds/17987/steps/build/logs/warnings%20%284%29

I think this is due to Db containing BumpPointerAllocator which contains an
aligned member:

class BumpPointerAllocator {
  ...
  alignas(16) char InitialBuffer[AllocSize];
  ...
};

-- 
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/20180626/4ceede8a/attachment.html>


More information about the llvm-bugs mailing list