KhronosGroup / OpenCL-Headers

Khronos OpenCL-Headers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MSVC preprocessor codepaths mistreat strict ANSI conformance (/Za)

MathiasMagnus opened this issue · comments

When compiling an empty main including cl.h the compiler bails out on anonymous structs when compiling in strict ANSI conformance using the /Za flag. This compiler option also defines __STDC__ which can be used to detect such use cases and be added to L487 of cl_platform.h to read:

#elif defined( _WIN32) && defined(_MSC_VER) && ! defined(__STDC__)

This issue is here for me to remember ro open a PR and what the issue is (since I got to the bottom of it).