Skip to content
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.

Commit

Permalink
gcc: ignore some libstdc++ 12.x.x maybe-uninitialized errors with ASAN
Browse files Browse the repository at this point in the history
  • Loading branch information
mpranj committed Sep 16, 2022
1 parent 8f4796b commit bd1543a
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/bindings/cpp/include/key.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,18 @@

#include <cstdarg>
#include <cstring>

#if __GNUC__ >= 12
#pragma GCC diagnostic error "-Wmaybe-uninitialized"
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#include <functional>
#pragma GCC diagnostic pop
#pragma GCC diagnostic pop
#else
#include <functional>
#endif

#include <locale>
#include <sstream>
#include <string>
Expand Down
11 changes: 11 additions & 0 deletions src/tools/kdb/gen/highlevel/common.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,18 @@
#define ELEKTRA_KDB_GEN_HIGHLEVEL_COMMON_HPP

#include <kdb.hpp>

#if __GNUC__ >= 12
#pragma GCC diagnostic error "-Wmaybe-uninitialized"
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#include <regex>
#pragma GCC diagnostic pop
#pragma GCC diagnostic pop
#else
#include <regex>
#endif


std::string upCaseFirst (const std::string & str);

Expand Down
11 changes: 11 additions & 0 deletions src/tools/kdb/gen/mustache.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,18 @@

#include <cassert>
#include <cctype>

#if __GNUC__ >= 12
#pragma GCC diagnostic error "-Wmaybe-uninitialized"
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#include <functional>
#pragma GCC diagnostic pop
#pragma GCC diagnostic pop
#else
#include <functional>
#endif

#include <iostream>
#include <memory>
#include <sstream>
Expand Down

0 comments on commit bd1543a

Please sign in to comment.