From a860b55b77720be43d4c30efea94d2cad55941cb Mon Sep 17 00:00:00 2001 From: yanying <201250106@smail.nju.edu.cn> Date: Sat, 7 Sep 2024 00:10:53 +0800 Subject: [PATCH] hh --- gdb-10.2.patch | 65 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) diff --git a/gdb-10.2.patch b/gdb-10.2.patch index d81030d..ea2d705 100644 --- a/gdb-10.2.patch +++ b/gdb-10.2.patch @@ -3187,3 +3187,68 @@ exit 0 result = stringtab + symbol_entry->_n._n_n._n_offset; } else +--- gdb-10.2/gdbsupport/enum-flags.h.orig ++++ gdb-10.2/gdbsupport/enum-flags.h +@@ -81,9 +81,12 @@ + template + struct enum_underlying_type + { ++ DIAGNOSTIC_PUSH ++ DIAGNOSTIC_IGNORE_ENUM_CONSTEXPR_CONVERSION + typedef typename + integer_for_size(T (-1) < T (0))>::type + type; ++ DIAGNOSTIC_POP + }; + + template + +--- gdb-10.2/include/diagnostics.h.orig ++++ gdb-10.2/include/diagnostics.h +@@ -61,6 +61,24 @@ + # define DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL \ + DIAGNOSTIC_IGNORE ("-Wformat-nonliteral") + ++# if __has_warning ("-Wuser-defined-warnings") ++# define DIAGNOSTIC_IGNORE_USER_DEFINED_WARNINGS \ ++ DIAGNOSTIC_IGNORE ("-Wuser-defined-warnings") ++# endif ++ ++# if __has_warning ("-Wunused-but-set-variable") ++# define DIAGNOSTIC_IGNORE_UNUSED_BUT_SET_VARIABLE \ ++ DIAGNOSTIC_IGNORE ("-Wunused-but-set-variable") ++# endif ++ ++# define DIAGNOSTIC_ERROR_SWITCH \ ++ DIAGNOSTIC_ERROR ("-Wswitch") ++ ++# if __has_warning ("-Wenum-constexpr-conversion") ++# define DIAGNOSTIC_IGNORE_ENUM_CONSTEXPR_CONVERSION \ ++ DIAGNOSTIC_IGNORE ("-Wenum-constexpr-conversion") ++# endif ++ + #elif defined (__GNUC__) /* GCC */ + + # if __GNUC__ >= 7 +@@ -100,4 +118,20 @@ + # define DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL + #endif + ++#ifndef DIAGNOSTIC_IGNORE_USER_DEFINED_WARNINGS ++# define DIAGNOSTIC_IGNORE_USER_DEFINED_WARNINGS ++#endif ++ ++#ifndef DIAGNOSTIC_IGNORE_UNUSED_BUT_SET_VARIABLE ++# define DIAGNOSTIC_IGNORE_UNUSED_BUT_SET_VARIABLE ++#endif ++ ++#ifndef DIAGNOSTIC_ERROR_SWITCH ++# define DIAGNOSTIC_ERROR_SWITCH ++#endif ++ ++#ifndef DIAGNOSTIC_IGNORE_ENUM_CONSTEXPR_CONVERSION ++# define DIAGNOSTIC_IGNORE_ENUM_CONSTEXPR_CONVERSION ++#endif ++ + #endif /* DIAGNOSTICS_H */ + -- 2.41.0.windows.1