Skip to content

Commit 1a63a60

Browse files
committed
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
1 parent 239bdc7 commit 1a63a60

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/SDL_endian.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030

3131
#include "SDL_stdinc.h"
3232

33-
#ifdef _MSC_VER
33+
#if defined(_MSC_VER) && !defined(__clang__)
3434
#include <intrin.h>
3535
#endif
3636

0 commit comments

Comments
 (0)