Skip to content

unknown-pragmas warnings in a header file with GCC on Github Actions CI #80

@Zylann

Description

@Zylann

On my Github Actions CI I get warnings while compiling FastNoise2 on the ubuntu-20.04 image:

modules/voxel/thirdparty/fast_noise_2/include/FastNoise/Metadata.h:10: error: ignoring #pragma warning  [-Werror=unknown-pragmas]
   10 | #pragma warning( push )
      | 
modules/voxel/thirdparty/fast_noise_2/include/FastNoise/Metadata.h:11: error: ignoring #pragma warning  [-Werror=unknown-pragmas]
   11 | #pragma warning( disable : 4251 )
      | 
In file included from modules/voxel/thirdparty/fast_noise_2/src/FastNoise/FastNoise_C.cpp:3:
modules/voxel/thirdparty/fast_noise_2/include/FastNoise/Metadata.h:229: error: ignoring #pragma warning  [-Werror=unknown-pragmas]
  229 | #pragma warning( pop )
      | 

It should be noted I compile the library as part of Godot, it is neither a dynamic lib nor a static lib. I translated the CMake files to Godot's build system and it works fine, however I haven't seen anything related to silencing such warnings.
Either way, this is in a header file.

Could it be due to a version of GCC not supported by the library? A Microsoft-specific feature? Could this be wrapped into conditionals?

Quick search found this microsoft/DirectXMath#133 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions