Przeglądaj źródła

ipc_helpers: Ignore GCC compiler warnings only on GCC

Clang and ICC for whatever reason also defines __GNUC__. Exclude them from this check.
Morph 3 lat temu
rodzic
commit
347432524c
1 zmienionych plików z 2 dodań i 2 usunięć
  1. 2 2
      src/core/hle/ipc_helpers.h

+ 2 - 2
src/core/hle/ipc_helpers.h

@@ -406,7 +406,7 @@ inline s32 RequestParser::Pop() {
 }
 }
 
 
 // Ignore the -Wclass-memaccess warning on memcpy for non-trivially default constructible objects.
 // Ignore the -Wclass-memaccess warning on memcpy for non-trivially default constructible objects.
-#if defined(__GNUC__)
+#if defined(__GNUC__) && !defined(__clang__) && !defined(__INTEL_COMPILER)
 #pragma GCC diagnostic push
 #pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Wclass-memaccess"
 #pragma GCC diagnostic ignored "-Wclass-memaccess"
 #endif
 #endif
@@ -417,7 +417,7 @@ void RequestParser::PopRaw(T& value) {
     std::memcpy(&value, cmdbuf + index, sizeof(T));
     std::memcpy(&value, cmdbuf + index, sizeof(T));
     index += (sizeof(T) + 3) / 4; // round up to word length
     index += (sizeof(T) + 3) / 4; // round up to word length
 }
 }
-#if defined(__GNUC__)
+#if defined(__GNUC__) && !defined(__clang__) && !defined(__INTEL_COMPILER)
 #pragma GCC diagnostic pop
 #pragma GCC diagnostic pop
 #endif
 #endif