-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Description
The STL's headers (currently <bit>, <complex>, <limits>) include <isa_availability.h>:
Line 16 in 5404ba9
| #include <isa_availability.h> |
Lines 195 to 197 in 5404ba9
| extern "C" { | |
| extern int __isa_available; | |
| } |
Line 256 in 5404ba9
| const bool _Definitely_have_lzcnt = __isa_available >= __ISA_AVAILABLE_AVX2; |
This VCRuntime header emits a non-reserved name, enum ISA_AVAILABILITY. Even though we don't use it directly, this could be seen as an extremely minor conformance issue.
While we strictly avoid enormously polluting headers like <Windows.h>, we have to include many intrinsics and UCRT headers which emit lots of MS-specific non-reserved names. This seems minor enough that I am strongly tempted to resolve it as wontfix. However, the fact that we have to manually declare extern "C" { extern int __isa_available; } every time (which is not provided by <isa_availability.h>) is a minor annoyance. If we wanted to do something about this, we could consider creating our own helper header, with an independent declaration of this variable and the constants we need, which would also avoid emitting the non-reserved name. (It would then be a good idea to static_assert in a source file that our own constants are identical to the official constants.)
Originally reported as DevCom-10357533 and internal VSO-1817556 / AB#1817556 .