diff --git a/src/base_object-inl.h b/src/base_object-inl.h index af69084f4a5595..fd194bc0a3e80d 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 861e03a8ad97aa..845fad5a063339 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 b04193c2ef1a7d..169e6491884542 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