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

            Bug ID: 42263
           Summary: Clang-cl support for MSVC overload of
                    __builtin_assume_aligned
           Product: new-bugs
           Version: unspecified
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedb...@nondot.org
          Reporter: k...@microsoft.com
                CC: htmldevelo...@gmail.com, llvm-bugs@lists.llvm.org

Created attachment 22087
  --> https://bugs.llvm.org/attachment.cgi?id=22087&action=edit
example

As part of the C++20 work for std::assume_aligned, MSVC has implemented an
intrinsic that has an already existing counterpart on clang, gcc, etc. The
declaration is almost identical to those except that it's constexpr. Function
declaration: 
constexpr void* __builtin_assume_aligned(const void*, size_t, ... ) noexcept;

Clang/GCC delcaration:
void* __builtin_assume_aligned(const void*, size_t, ... ) noexcept;

Currently the MSVC intrinsic isn't accepted due to it's constexprness (or at
least on clang-cl it's not right now) but we'd like this to work on that front
end at some point.

Current error:
error: constexpr declaration of '__builtin_assume_aligned' follows
non-constexpr declaration
constexpr void* __builtin_assume_aligned(const void*, size_t, ... /* size_t
misalignmentOffset */) noexcept;
                ^
bug.cpp(2,17): note: previous declaration is here

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

Reply via email to