<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/119154>119154</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [libc][math][windows] math tests cannot build with windows SDK 10.0.22621.0
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            libc
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
            SchrodingerZhu
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          SchrodingerZhu
      </td>
    </tr>
</table>

<pre>
    ```
[17/1649] Building CXX object libc/test/UnitTest/CMakeFiles/LibcFPTestHelpers.unit.dir/FEnvSafeTest.cpp.obj
FAILED: libc/test/UnitTest/CMakeFiles/LibcFPTestHelpers.unit.dir/FEnvSafeTest.cpp.obj
sccache C:\PROGRA~1\LLVM\bin\clang-cl.exe  /nologo -TP -DLIBC_NAMESPACE=__llvm_libc_20_0_0_git -DTARGET_SUPPORTS_CLOCK -D_DEBUG -ID:/llvm-project/libc /DWIN32 /D_WINDOWS   /Zc:inline /Zc:__cplusplus /Oi /bigobj /permissive- -Werror=unguarded-availability-new /W4 -wd4141 -wd4146 -wd4244 -wd4267 -wd4291 -wd4351 -wd4456 -wd4457 -wd4458 -wd4459 -wd4503 -wd4624 -wd4722 -wd4100 -wd4127 -wd4512 -wd4505 -wd4610 -wd4510 -wd4702 -wd4245 -wd4706 -wd4310 -wd4701 -wd4703 -wd4389 -wd4611 -wd4805 -wd4204 -wd4577 -wd4091 -wd4592 -wd4319 -wd4709 -wd5105 -wd4324 -wd4251 -wd4275 -w14062 -we4238 /Ob0 /Od /RTC1 -std:c++17 -MDd -Zi /showIncludes /Folibc/test/UnitTest/CMakeFiles/LibcFPTestHelpers.unit.dir/FEnvSafeTest.cpp.obj /Fdlibc\test\UnitTest\CMakeFiles\LibcFPTestHelpers.unit.dir\LibcFPTestHelpers.unit.pdb -c -- D:/llvm-project/libc/test/UnitTest/FEnvSafeTest.cpp
In file included from D:/llvm-project/libc/test/UnitTest/FEnvSafeTest.cpp:11:
In file included from D:/llvm-project/libc\src/__support/FPUtil/FEnvImpl.h:24:
D:/llvm-project/libc\src/__support/FPUtil\aarch64/FEnvImpl.h(47,29): error: expected member name or ';' after declaration specifiers   
   47 | static constexpr uint32_t OVERFLOW = 0x4;
      | ~~~~~~~~~~~~~~~~~~~~~~~~~ ^
C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\ucrt\corecrt_math.h(975,25): note: expanded from macro 'OVERFLOW'
  975 |     #define OVERFLOW    _OVERFLOW
      | ^
C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\ucrt\corecrt_math.h(68,21): note: expanded from macro '_OVERFLOW'
   68 | #define _OVERFLOW   3   // overflow range error
      |                     ^
In file included from D:/llvm-project/libc/test/UnitTest/FEnvSafeTest.cpp:11:
In file included from D:/llvm-project/libc\src/__support/FPUtil/FEnvImpl.h:24:
D:/llvm-project/libc\src/__support/FPUtil\aarch64/FEnvImpl.h(48,29): error: expected member name or ';' after declaration specifiers   
   48 | static constexpr uint32_t UNDERFLOW = 0x8;
      | ~~~~~~~~~~~~~~~~~~~~~~~~~ ^
C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\ucrt\corecrt_math.h(976,25): note: expanded from macro 'UNDERFLOW'
  976 |     #define UNDERFLOW   _UNDERFLOW
      | ^
C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\ucrt\corecrt_math.h(69,21): note: expanded from macro '_UNDERFLOW'
   69 | #define _UNDERFLOW  4   // underflow range error
      |                     ^
In file included from D:/llvm-project/libc/test/UnitTest/FEnvSafeTest.cpp:11:
In file included from D:/llvm-project/libc\src/__support/FPUtil/FEnvImpl.h:24:
D:/llvm-project/libc\src/__support/FPUtil\aarch64/FEnvImpl.h(189,23): error: expected unqualified-id
  189 |   if (toRaise & FEnv::OVERFLOW) {
 |                       ^
C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\ucrt\corecrt_math.h(975,25): note: expanded from macro 'OVERFLOW'
  975 |     #define OVERFLOW    _OVERFLOW
      | ^
C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\ucrt\corecrt_math.h(68,21): note: expanded from macro '_OVERFLOW'
   68 | #define _OVERFLOW   3   // overflow range error
      |                     ^
In file included from D:/llvm-project/libc/test/UnitTest/FEnvSafeTest.cpp:11:
In file included from D:/llvm-project/libc\src/__support/FPUtil/FEnvImpl.h:24:
D:/llvm-project/libc\src/__support/FPUtil\aarch64/FEnvImpl.h(193,17): error: expected unqualified-id
  193 |           FEnv::OVERFLOW))
      | ^
C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\ucrt\corecrt_math.h(975,25): note: expanded from macro 'OVERFLOW'
  975 |     #define OVERFLOW    _OVERFLOW
      | ^
C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\ucrt\corecrt_math.h(68,21): note: expanded from macro '_OVERFLOW'
   68 | #define _OVERFLOW   3   // overflow range error
      |                     ^
In file included from D:/llvm-project/libc/test/UnitTest/FEnvSafeTest.cpp:11:
In file included from D:/llvm-project/libc\src/__support/FPUtil/FEnvImpl.h:24:
D:/llvm-project/libc\src/__support/FPUtil\aarch64/FEnvImpl.h(196,23): error: expected unqualified-id
  196 |   if (toRaise & FEnv::UNDERFLOW) {
 |                       ^
C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\ucrt\corecrt_math.h(976,25): note: expanded from macro 'UNDERFLOW'
  976 |     #define UNDERFLOW   _UNDERFLOW
      | ^
C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\ucrt\corecrt_math.h(69,21): note: expanded from macro '_UNDERFLOW'
   69 | #define _UNDERFLOW  4   // underflow range error
      |                     ^
In file included from D:/llvm-project/libc/test/UnitTest/FEnvSafeTest.cpp:11:
In file included from D:/llvm-project/libc\src/__support/FPUtil/FEnvImpl.h:24:
D:/llvm-project/libc\src/__support/FPUtil\aarch64/FEnvImpl.h(200,17): error: expected unqualified-id
  200 |           FEnv::UNDERFLOW))
      | ^
C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\ucrt\corecrt_math.h(976,25): note: expanded from macro 'UNDERFLOW'
  976 |     #define UNDERFLOW   _UNDERFLOW
      | ^
C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\ucrt\corecrt_math.h(69,21): note: expanded from macro '_UNDERFLOW'
   69 | #define _UNDERFLOW  4   // underflow range error
      |                     ^
6 errors generated.
[23/1649] Building CXX object libc/test/UnitTest/CMakeFiles/LibcScanfHelpers.unit.dir/ScanfMatcher.cpp.obj 
ninja: build stopped: subcommand failed.
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzsWVtzozgW_jXyyylcQkJcHvyAwe51dW4VJ5OpfqGEkG1lMbBCJJmX-e1bAtpxp5Pdyez0dqrGjuMDunzSd6TvHArxtlXbSsoZYnNEyFrsdF2oaiv1l12HCEEsnfDO7Go9-7ZuktfFbzPk4_GLY8TmboDI0vW9CLEU5p0qbXNIfv0V6vxeCgOlygUiSyNbg8jytlLmZrhMzvk_5VKVskVkeaZysbyyNf-QZSN1O-0qZaaF0ogsl4vqYc030lZPRdNM6_we4XgZr84WKaLxDxyjFYKLnYQE0Rix5Or68tN1_LuLWHJ29ss5YkmuKsQSUfJq64hyKp8kACLLqi7rbQ3OzRU46dlqnmQX8flifRUnC0TTLCvLh31mp50RnNm_rTLgpDfx9afFTba-vbq6vL5ZZ8nZZfIZnDRLF_PbT-CsLF1Elra70-jaetjeqlzYUdO71QUl_VV2t7pIL-_W0E_ni0A0VlWpKnm4zTLRlF1r_23ZpbK_udrW-b29aqTeq7ZVD9IB505qXWtE067adlwXsnD4A1clz1WpzG9OJR9tnzsPnMfCcz13tH5viTeUEz8YbDTUUzZYj_mjDUYbjjbqLcO0tz4ZcAJCBnyMB0uGfswlY3s2tHfxWD7YAJNxPmy8H8alh3p3tMN4NIxGnKE8HHEJHubBgmFcPPJhERnxohGnt8wd-9Fx_mTkTQJb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