[llvm-bugs] [Bug 48842] New: Wrong alignment of __declspec(align)ed typedef with reduced alignment

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Jan 22 03:27:10 PST 2021


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

            Bug ID: 48842
           Summary: Wrong alignment of __declspec(align)ed typedef with
                    reduced alignment
           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

Consider

__declspec(align(2)) typedef int A;

int f(void) {
        return _Alignof(A);
}

msvc returns 4, clang returns 2 on the x86_64-pc-windows-msvc target.

-- 
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/497011b1/attachment.html>


More information about the llvm-bugs mailing list