mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-25 02:03:37 +08:00
a0dc02a6df
I see these errors when building with clang: CXX compile/compile-cplus-types.o /home/emaisin/src/binutils-gdb/gdb/compile/compile-cplus-types.c:306:56: error: cannot pass non-trivial object of type 'compile_scope' to variadic function; expected type from format string was 'void *' [-Wnon-pod-varargs] fprintf_unfiltered (gdb_stdlog, "leaving scope %p\n", current); ~~ ^~~~~~~ /home/emaisin/src/binutils-gdb/gdb/compile/compile-cplus-types.c:1058:13: error: comparison of two values with different enumeration types ('enum_flags<gcc_cp_qualifiers>::enum_type' (aka 'gcc_cp_qualifiers') and 'gcc_cp_ref_qualifiers') [-Werror,-Wenum-compare] if (quals != GCC_CP_REF_QUAL_NONE) ~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~ Fix the first one by using host_address_to_string. Fix the second one by comparing to 0 instead. I think the current comparison simply uses the wrong enum type. Comparing to 0 seems like the right thing to do, because we want to check whether any flags are specified. gdb/ChangeLog: * compile/compile-cplus-types.c (compile_cplus_instance::leave_scope): Take the address of scope object. (compile_cplus_instance::convert_qualified_base): Compare quals to 0. |
||
---|---|---|
.. | ||
compile-c-support.c | ||
compile-c-symbols.c | ||
compile-c-types.c | ||
compile-c.h | ||
compile-cplus-symbols.c | ||
compile-cplus-types.c | ||
compile-cplus.h | ||
compile-internal.h | ||
compile-loc2c.c | ||
compile-object-load.c | ||
compile-object-load.h | ||
compile-object-run.c | ||
compile-object-run.h | ||
compile.c | ||
compile.h | ||
gcc-c-plugin.h | ||
gcc-cp-plugin.h |