<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/142336>142336</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
C5054 can be silenced with MSVC & C++ 20
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
scuzqy
</td>
</tr>
</table>
<pre>
C5054 was introduced since VS 16.2
https://learn.microsoft.com/cpp/error-messages/compiler-warnings/c5054?view=msvc-170
configuration:
LLVM_ENABLE_PROJECTS=On
CMAKE_CXX_FLAGS=/DWIN32 /D_WINDOWS /W4 /arch:AVX2
CMAKE_CXX_STANDARD=20
LLVM_ALLOW_PROBLEMATIC_CONFIGURATIONS=On
build system: Ninja (RelWithDebInfo) & VS 17.13.6 (19.43.34810) & amd64
build output:
```
llvm-project\llvm\include\llvm/BinaryFormat/MachO.h(1566): warning C5054: operator '|': deprecated between enumerations of different types
llvm-project\llvm\include\llvm/BinaryFormat/MachO.h(1570): warning C5054: operator '|': deprecated between enumerations of different types
llvm-project\llvm\include\llvm/BinaryFormat/MachO.h(1571): warning C5054: operator '|': deprecated between enumerations of different types
llvm-project\llvm\include\llvm/BinaryFormat/MachO.h(1574): warning C5054: operator '|': deprecated between enumerations of different types
[988/10072] Building CXX object llvm\lib\MC\CMakeFiles\LLVMMC.dir\MCAsmBackend.cpp.obj
llvm-project\llvm\include\llvm\BinaryFormat\ELFRelocs/LoongArch.def(1): warning C4819: The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss
llvm-project\llvm\include\llvm/BinaryFormat/MachO.h(1566): warning C5054: operator '|': deprecated between enumerations of different types
llvm-project\llvm\include\llvm/BinaryFormat/MachO.h(1570): warning C5054: operator '|': deprecated between enumerations of different types
llvm-project\llvm\include\llvm/BinaryFormat/MachO.h(1571): warning C5054: operator '|': deprecated between enumerations of different types
llvm-project\llvm\include\llvm/BinaryFormat/MachO.h(1574): warning C5054: operator '|': deprecated between enumerations of different types
```
```
llvm-project\llvm\include\llvm/IR/Instruction.def(158): warning C5054: operator '+': deprecated between enumerations of different types
llvm-project\llvm\include\llvm/IR/Instruction.def(161): warning C5054: operator '+': deprecated between enumerations of different types
llvm-project\llvm\include\llvm/IR/Instruction.def(162): warning C5054: operator '+': deprecated between enumerations of different types
llvm-project\llvm\include\llvm/IR/Instruction.def(163): warning C5054: operator '+': deprecated between enumerations of different types
llvm-project\llvm\include\llvm/IR/Instruction.def(164): warning C5054: operator '+': deprecated between enumerations of different types
llvm-project\llvm\include\llvm/IR/Instruction.def(165): warning C5054: operator '+': deprecated between enumerations of different types
```
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJzsl01v2zgTxz8NfSEiUNSL5YMPtBwVfh6_LOw0zs2gqJHFViK1JGUj--kXVJ1us8ACwaLbIkABg7BGlOan_3CGHG6tPCuAOUoWKFlO-OAabeZWDH_8_jwpdfU8zxOSxPjKLZbKGV0NAipspRKAHw84TAOKCGuc6y2KGKIFokUL3Kigk8Joq2sXCN0hWoi-R7QAY7S568BafgbrzbrrZQvm7sqNkuo82rxPFBUXCVcULTt7EXfhlCDCEGFCq1qeB8Od1Mr7JGy9ftyc7rdssb4__bbf_e8-fzigaLlTiLB8w_5_f8qfnk7Fmn3wZkSL5XG1jSj2_07H1Xa5Ox78xTH2IzeiQRFjj0_01fOHB7Zdsv0SRUtKXryy9Xp39E4X6_sNe1jlp3y3LVYfPu7Zw2q3_YqBCCsH2VbYPlsHHYoY3kr1iWNEsz20R-maJZQrVWtEZxjRdFR3GoRRkPo54SyIoyCKs5C8TOBdlcbfvloPrh_cF0lQSm4_wtr20t31Rn8C4VCS-0uU5FKJdqjgxUCLhVTcPBfadNwhWmy4aHZB430naYrozDPfgoTzLxFiWPdguNMGIzpF09yPEcMV9AYEd1DhEtwVQGFQQwdfgmaxrnEl6xoMKIfdcw_2u2BOyfvADN8HZvwDMFGymGUZokVI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