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

            Bug ID: 39713
           Summary: std::alignment_of<T>::value might be different from
                    alignof(T)
           Product: libc++
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: All Bugs
          Assignee: unassignedclangb...@nondot.org
          Reporter: sbe...@google.com
                CC: llvm-bugs@lists.llvm.org, mclow.li...@gmail.com

Simple repro:

#include <type_traits>
static_assert(alignof(long long) == std::alignment_of<long long>::value);

With compiler flags: -std=c++17 -m32 -stdlib=libc++

alignof(long long) == 4
std::alignment_of<long long>::value == 8

The problem is that std::alignment_of is using __alignof__ which gives a
different result than alignof in this particular case.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to