Forráskód Böngészése

Fixed bug 5539 - Clang 11 fails to compile a CMake build with conflicting types for _m_prefetchw

vladius

In SDL_cpuinfo.h it seems like <intrin.h> is not included when __clang__ is defined, as the comment in the file explicitly reads:
"Many of the intrinsics SDL uses are not implemented by clang with Visual Studio"

However, the SDL_endian.h header does include <intrin.h> without any precautions like:
>#ifdef _MSC_VER
>#include <intrin.h>
>#endif

Maybe it should be changed to something like:
>#ifdef _MSC_VER
>#ifndef __clang__
>#include <intrin.h>
>#endif
>#endif
Sam Lantinga 4 éve
szülő
commit
ef52560a24
1 módosított fájl, 1 hozzáadás és 1 törlés
  1. 1 1
      include/SDL_endian.h

+ 1 - 1
include/SDL_endian.h

@@ -30,7 +30,7 @@
 
 #include "SDL_stdinc.h"
 
-#ifdef _MSC_VER
+#if defined(_MSC_VER) && !defined(__clang__)
 #include <intrin.h>
 #endif