diff --git a/src/base_object-inl.h b/src/base_object-inl.h index f35cd6734edf0b..3d36eaa923012e 100644 --- a/src/base_object-inl.h +++ b/src/base_object-inl.h @@ -27,7 +27,15 @@ #include "base_object.h" #include "env-inl.h" #include "util.h" + +#if defined(__GNUC__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wcast-function-type" +#endif #include "v8.h" +#if defined(__GNUC__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif namespace node { diff --git a/src/node.h b/src/node.h index 9e35b66ff419e2..3b962411de7734 100644 --- a/src/node.h +++ b/src/node.h @@ -60,7 +60,14 @@ # define SIGKILL 9 #endif +#if defined(__GNUC__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wcast-function-type" +#endif #include "v8.h" // NOLINT(build/include_order) +#if defined(__GNUC__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif #include "v8-platform.h" // NOLINT(build/include_order) #include "node_version.h" // NODE_MODULE_VERSION diff --git a/src/util.h b/src/util.h index 2f6c17fc321a67..94db8f79c8f166 100644 --- a/src/util.h +++ b/src/util.h @@ -24,7 +24,14 @@ #if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS +#if defined(__GNUC__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wcast-function-type" +#endif #include "v8.h" +#if defined(__GNUC__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif #include #include // PATH_MAX