[llvm-bugs] [Bug 48849] New: Wrong size of struct with __declspec(align)ed field

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Jan 22 09:31:48 PST 2021


            Bug ID: 48849
           Summary: Wrong size of struct with __declspec(align)ed field
           Product: clang
           Version: 11.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C
          Assignee: unassignedclangbugs at nondot.org
          Reporter: ju.orth at gmail.com
                CC: blitzrakete at gmail.com, dgregor at apple.com,
                    erik.pilkington at gmail.com, llvm-bugs at lists.llvm.org,
                    richard-llvm at metafoo.co.uk


struct X {
        __declspec(align(4)) long long a[0];

int f(void) {
        return sizeof(struct X);

msvc returns 4, clang returns 8 on the x86_64-pc-windows-msvc target. See my
comment here [1].

[1] https://bugs.llvm.org/show_bug.cgi?id=48842#c1

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/20210122/3e302b3a/attachment.html>

More information about the llvm-bugs mailing list