Skip to content

Commit

Permalink
fix: Disable warnings only on GCC 12 and higher
Browse files Browse the repository at this point in the history
  • Loading branch information
WerWolv committed May 28, 2022
1 parent a4c8bca commit 8a24517
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions lib/libimhex/include/hex/helpers/encoding_file.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,16 @@

// TODO: Workaround for weird issue picked up by GCC 12.1.0 and later. This seems like a compiler bug mentioned in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98465
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunknown-warning-option"
#pragma GCC diagnostic ignored "-Wpragmas"
#pragma GCC diagnostic ignored "-Wrestrict"
#pragma GCC diagnostic ignored "-Wstringop-overread"
#include <map>
#include <string_view>
#include <vector>

#if (__GNUC__ >= 12)
#pragma GCC diagnostic ignored "-Wrestrict"
#pragma GCC diagnostic ignored "-Wstringop-overread"
#endif

#include <map>
#include <string_view>
#include <vector>

#pragma GCC diagnostic pop

#include <hex/helpers/fs.hpp>
Expand Down

0 comments on commit 8a24517

Please sign in to comment.