From 2505272e9516d881b5947a6ac3a1ffacd9ca07c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Mon, 24 Feb 2025 12:33:11 +0100 Subject: [PATCH] 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. --- src/Magnum/GL/Context.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Magnum/GL/Context.cpp b/src/Magnum/GL/Context.cpp index 559b25d64..9ac9a9a11 100644 --- a/src/Magnum/GL/Context.cpp +++ b/src/Magnum/GL/Context.cpp @@ -699,10 +699,10 @@ Context* currentContext = nullptr; called from. To avoid #ifdef hell in code below, the currentContext is 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) -/* Clang-CL (and regular Clang as well) complains that the function has a - return type incompatible with C. I don't care, I only need an unmangled name - to look up later at runtime. */ -#ifdef CORRADE_TARGET_CLANG +/* MinGW Clang and Clang-CL complains that the function has a return type + incompatible with C. I don't care, I only need an unmangled name to look up + later at runtime. */ +#if defined(CORRADE_TARGET_CLANG_CL) || (defined(CORRADE_TARGET_MINGW) && defined(CORRADE_TARGET_CLANG)) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wreturn-type-c-linkage" #endif