This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Silence GCC "uninitialized" warning on minsyms.c:lookup_minimal_symbol_by_pc_section


>>>>> "Pedro" == Pedro Alves <palves@redhat.com> writes:

Pedro> The simplest is to add a "default:" case with a gdb_assert, but
Pedro> when I wrote that code, I had not done that on purpose,
Pedro> thinking that I'd prefer it if we enabled "-Wswitch" in gdb, which
Pedro> helps find switch/cases where we need to handle a new enumerator,
Pedro> whenever we add one, like this:

I looked at adding -Wswitch or -Wswitch-enum once.  All I really
remember is thinking that there were cases where gdb would not want
this.

However, I think maybe it can be done on a case-by-case basis with
"#pragma GCC diagnostic push".

Tom


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]