misc: Fix 'maybe-uninitialized' warn turn off (#706)

https://github.com/gem5/gem5/pull/696 was implemented incorrectly and
and causes error when running with GCC 12.1. This patch fixes the error.
This commit is contained in:
Bobby R. Bruce
2023-12-21 10:21:20 -08:00
parent e95389920a
commit c4146d8813

View File

@@ -45,12 +45,10 @@
// ignore 'maybe-uniitialized' warnings for GCC 12.1.
#if __GNUC__ && __GNUC__ == 12 && __GNUC_MINOR__ == 1
#if __has_warning( "-Wmaybe-uninitialized" )
#define SUPPRESSING_MAYBE_UNINITIALIZED_WARNING
// save diagnostic state.
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#endif
#define SUPPRESSING_MAYBE_UNINITIALIZED_WARNING
// save diagnostic state.
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#endif
#include <regex>
#ifdef SUPPRESSING_MAYBE_UNINITIALIZED_WARNING