Browse Source

GL: suppress an error/warning on MinGW Clang too, not just clang-cl.

Although in this case it seems that it doesn't warn at all, for some
reason, unlike with the same case in Corrade's Debug global state?
Weird.
pull/674/head
Vladimír Vondruš 1 year ago
parent
commit
2505272e95
  1. 8
      src/Magnum/GL/Context.cpp

8
src/Magnum/GL/Context.cpp

@ -699,10 +699,10 @@ Context* currentContext = nullptr;
called from. To avoid #ifdef hell in code below, the currentContext is called from. To avoid #ifdef hell in code below, the currentContext is
redefined to return a value from this uniqueness-ensuring function. */ redefined to return a value from this uniqueness-ensuring function. */
#if defined(CORRADE_TARGET_WINDOWS) && defined(MAGNUM_BUILD_STATIC_UNIQUE_GLOBALS) && !defined(CORRADE_TARGET_WINDOWS_RT) #if defined(CORRADE_TARGET_WINDOWS) && defined(MAGNUM_BUILD_STATIC_UNIQUE_GLOBALS) && !defined(CORRADE_TARGET_WINDOWS_RT)
/* Clang-CL (and regular Clang as well) complains that the function has a /* MinGW Clang and Clang-CL complains that the function has a return type
return type incompatible with C. I don't care, I only need an unmangled name incompatible with C. I don't care, I only need an unmangled name to look up
to look up later at runtime. */ later at runtime. */
#ifdef CORRADE_TARGET_CLANG #if defined(CORRADE_TARGET_CLANG_CL) || (defined(CORRADE_TARGET_MINGW) && defined(CORRADE_TARGET_CLANG))
#pragma clang diagnostic push #pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wreturn-type-c-linkage" #pragma clang diagnostic ignored "-Wreturn-type-c-linkage"
#endif #endif

Loading…
Cancel
Save