llvm / llvm/llvm-project

clang-x64 windows-msvc /adcintrin.h/adxintrin.h error: constexpr declaration of '_addcarry_u32'/'_subborrow_u32'/'_addcarry_u64'/'_subborrow_u64'/'_addcarryx_u32'/'_addcarryx_u64' follows non-constexpr declaration

Open
#185,472 0 comments 0 reactions 0 assignees View on GitHub
clang:headers platform:windows
Dominant language
LLVM
Stars
40.5k
Forks
18.7k
PR merge metrics
PR metrics pending

Description

```
In file included from D:/msvc/VC/Tools/MSVC/14.51.36014/include\string:10:
In file included from D:/msvc/VC/Tools/MSVC/14.51.36014/include\xstring:11:
In file included from D:/msvc/VC/Tools/MSVC/14.51.36014/include\__msvc_string_view.hpp:12:
In file included from D:/msvc/VC/Tools/MSVC/14.51.36014/include\iosfwd:13:
In file included from D:/msvc/VC/Tools/MSVC/14.51.36014/include\cwchar:12:
In file included from D:/msvc/Windows Kits/10/Include/10.0.26100.0/ucrt\wchar.h:29:
In file included from D:/LLVM-22.1.0-win64/lib/clang/22/include\intrin.h:18:
In file included from D:/LLVM-22.1.0-win64/lib/clang/22/include\intrin0.h:19:
D:/LLVM-22.1.0-win64/lib/clang/22/include\adcintrin.h:59:43: error: constexpr declaration of '_addcarry_u32' follows non-constexpr declaration
59 | __INLINE unsigned char __DEFAULT_FN_ATTRS _addcarry_u32(unsigned char __cf,
| ^
D:\msvc\VC\Tools\MSVC\14.51.36014\include\intrin.h:928:32: note: previous declaration is here
928 | __MACHINEX86_X64(unsigned char _addcarry_u32(unsigned char, unsigned int, unsigned int, unsigned int *))
| ^

```
the same errors for all functions in [adcintrin.h](https://github.com/llvm/llvm-project/blob/main/clang/lib/Headers/adcintrin.h) and [adxintrin.h](https://github.com/llvm/llvm-project/blob/main/clang/lib/Headers/adxintrin.h)

so this functions '_addcarry_u32'/'_subborrow_u32'/'_addcarry_u64'/'_subborrow_u64'/ '_addcarryx_u32'/'_addcarryx_u64' should move as builtin to avoid MSVC conflicts

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.