Skip to content

Compiler warnings with recent commit #31517

Closed
@mscdex

Description

@mscdex
  • 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    buildIssues and PRs related to build files or the CI.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions