binutils-gdb/gdb/compile
Simon Marchi a0dc02a6df Fix compile-cplus-types.c build errors
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.
2018-08-30 11:09:48 -04:00
..
compile-c-support.c C++ compile support 2018-08-29 15:12:24 -07:00
compile-c-symbols.c Use BLOCK_ENTRY_PC in place of most uses of BLOCK_START 2018-08-23 16:19:18 -07:00
compile-c-types.c Move compile_instance to compile.c 2018-08-10 11:14:25 -07:00
compile-c.h Move compile_instance to compile.c 2018-08-10 11:14:25 -07:00
compile-cplus-symbols.c C++ compile support 2018-08-29 15:12:24 -07:00
compile-cplus-types.c Fix compile-cplus-types.c build errors 2018-08-30 11:09:48 -04:00
compile-cplus.h C++ compile support 2018-08-29 15:12:24 -07:00
compile-internal.h C++ compile support 2018-08-29 15:12:24 -07:00
compile-loc2c.c Move C-related declarations to compile-c.h 2018-08-10 11:14:25 -07:00
compile-object-load.c C++ compile support 2018-08-29 15:12:24 -07:00
compile-object-load.h Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
compile-object-run.c Use BLOCK_ENTRY_PC in place of most uses of BLOCK_START 2018-08-23 16:19:18 -07:00
compile-object-run.h Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
compile.c C++ compile support 2018-08-29 15:12:24 -07:00
compile.h Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
gcc-c-plugin.h Add a C++ wrapper for GCC C plug-in 2018-08-10 11:14:25 -07:00
gcc-cp-plugin.h C++ compile support 2018-08-29 15:12:24 -07:00