Closed
Description
- Version: master
- Platform: linux
- Subsystem: build
#31475 appears to have introduced compiler warnings, at least with GCC 7.4.0. These warnings even show up in CI runs for that PR, such as on the Ubuntu 18.04 build node.
They look like this:
../src/node.h:65:32: warning: unknown option after ‘#pragma GCC diagnostic’ kind [-Wpragmas]
#pragma GCC diagnostic ignored "-Wcast-function-type"
^~~~~~~~~~~~~~~~~~~~~~
In file included from ../src/node_main_instance.h:9:0,
from /home/mscdex/git/node/out/Release/obj/gen/node_snapshot.cc:2:
../src/node.h:65:32: warning: unknown option after ‘#pragma GCC diagnostic’ kind [-Wpragmas]
#pragma GCC diagnostic ignored "-Wcast-function-type"
^~~~~~~~~~~~~~~~~~~~~~
My guess is that the warning types are GCC version-dependent. Perhaps we just need to wrap these with an #ifdef
checking the compiler version?
/cc @danbev