Skip to content

Commit

Permalink
re-enable anonymous unions by default (KhronosGroup#125)
Browse files Browse the repository at this point in the history
  • Loading branch information
bashbaug authored Oct 7, 2020
1 parent d65bcc5 commit b316a57
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions CL/cl.h
Original file line number Diff line number Diff line change
Expand Up @@ -134,27 +134,29 @@ typedef struct _cl_image_desc {
cl_uint num_mip_levels;
cl_uint num_samples;
#ifdef CL_VERSION_2_0
#if __CL_HAS_ANON_STRUCT__
#ifdef _MSC_VER
#if _MSC_VER >= 1500
#pragma warning( push )
#pragma warning( disable : 4201 ) /* Prevents warning about nameless struct/union in /W4 /Za builds */
#if defined(__GNUC__)
__extension__ /* Prevents warnings about anonymous union in -pedantic builds */
#endif
#if defined(_MSC_VER) && !defined(__STDC__)
#pragma warning( push )
#pragma warning( disable : 4201 ) /* Prevents warning about nameless struct/union in /W4 builds */
#endif
__CL_ANON_STRUCT__
#if defined(_MSC_VER) && defined(__STDC__)
/* Anonymous unions are not supported in /Za builds */
#else
union {
#endif
#endif
cl_mem buffer;
#ifdef CL_VERSION_2_0
#if __CL_HAS_ANON_STRUCT__
#if defined(_MSC_VER) && defined(__STDC__)
/* Anonymous unions are not supported in /Za builds */
#else
cl_mem mem_object;
};
#ifdef _MSC_VER
#if _MSC_VER >= 1500
#pragma warning( pop )
#endif
#endif
#if defined(_MSC_VER) && !defined(__STDC__)
#pragma warning( pop )
#endif
#endif
} cl_image_desc;
Expand Down

0 comments on commit b316a57

Please sign in to comment.