Skip to content

Conversation

cpplearner
Copy link
Contributor

@cpplearner cpplearner commented May 18, 2025

Closes #2310

  • 7 libc++ tests and 51 std tests include <Windows.h> (possibly via a centralized header, e.g. test_death.hpp), and produce warning C28301: C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\um\winnt.h(3209) : warning C28301: No annotations for first declaration of '_InterlockedCompareExchange128'. See c:\program files\microsoft visual studio\2022\preview\vc\tools\msvc\14.44.35207\include\intrin0.inl.h(185).
    • I've suppressed the warning by adding the /wd28301 compiler option. It might also be possible to instead add a pragma to each affected file.
  • Windows SDK 10.0.22621.0 uses #pragma intrinsic(fabsf) in <corecrt_math.h> for ARM64EC, which seems to cause problems in several tests.
    • GH_002206_unreserved_names needs to avoid defining intrinsic as a macro.
    • 3 modules tests fail with error LNK2019: unresolved external symbol fabsf referenced in function #fabsf$exit_thunk (EC Symbol).
      • 2 of them pass locally with Windows SDK 10.0.26100.0, but VSO_1775715_user_defined_modules is still failing with tests\std\tests\VSO_1775715_user_defined_modules\user.ixx(24): error C2678: binary '==': no operator found which takes a left-hand operand of type 'const std::string' (or there is no acceptable conversion).
  • Windows SDK 10.0.26100.0 instead uses #pragma function(fabsf) in <corecrt_math.h>, which seems to fix the abovementioned problems, but breaks Clang 19. This is LLVM-116256 and fixed in Clang 20.
    • I didn't check whether all tests pass with Clang 19 and Windows SDK 10.0.22621.0.
  • GH_001103_countl_zero_correctness needs to update its preprocessor condition to exclude ARM64EC. I've copied the condition from <__msvc_bit_utils.hpp>.

@cpplearner cpplearner requested a review from a team as a code owner May 18, 2025 04:25
@github-project-automation github-project-automation bot moved this to Initial Review in STL Code Reviews May 18, 2025
@StephanTLavavej StephanTLavavej added infrastructure Related to repository automation test Related to test code ARM64 Related to the ARM64 architecture labels May 18, 2025
@StephanTLavavej StephanTLavavej moved this from Initial Review to Work In Progress in STL Code Reviews May 18, 2025
@StephanTLavavej StephanTLavavej moved this from Work In Progress to Initial Review in STL Code Reviews May 18, 2025
@StephanTLavavej StephanTLavavej self-assigned this May 18, 2025
@StephanTLavavej StephanTLavavej removed their assignment May 20, 2025
@StephanTLavavej StephanTLavavej moved this from Initial Review to Ready To Merge in STL Code Reviews May 20, 2025
Comment on lines +8 to +10
// Windows SDK 10.0.26100.0 will avoid that error, but we'll need to investigate why user.ixx emits:
// "error C2678: binary '==': no operator found which takes a left-hand operand of type 'const std::string'
// (or there is no acceptable conversion)"
Copy link
Contributor Author

@cpplearner cpplearner May 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This error C2678 turns out to be unaffected by architecture or Windows SDK version, and affected by the execution charset: error C2678 manifests if and only if the execution charset is not self-synchronizing (e.g. cp932, cp936). With cp1252 or UTF-8, the test compiles successfully.

No change requested for this PR,but we could maybe file a bug report against the compiler.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like something in some non-_Is_execution_charset_self_synchronizing() branch in <format> fails to compile.

@StephanTLavavej StephanTLavavej moved this from Ready To Merge to Merging in STL Code Reviews May 22, 2025
@StephanTLavavej
Copy link
Member

I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed.

@StephanTLavavej StephanTLavavej merged commit 23475b1 into microsoft:main May 22, 2025
48 checks passed
@github-project-automation github-project-automation bot moved this from Merging to Done in STL Code Reviews May 22, 2025
@StephanTLavavej
Copy link
Member

Thanks for increasing our Azure spending significantly! 📈 💵 🤑

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ARM64 Related to the ARM64 architecture infrastructure Related to repository automation test Related to test code
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Make ARM64EC built on GitHub
3 participants