This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Fix compile-cplus-types.c build errors
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Simon Marchi <simon dot marchi at ericsson dot com>
- Cc: gdb-patches at sourceware dot org, Keith Seitz <keiths at redhat dot com>
- Date: Thu, 30 Aug 2018 17:04:58 +0200
- Subject: Re: [PATCH] Fix compile-cplus-types.c build errors
- References: <1535640184-20543-1-git-send-email-simon.marchi@ericsson.com>
Hi Simon,
> gdb/ChangeLog:
>
> * compile/compile-cplus-types.c
> (compile_cplus_instance::enter_scope): Take the address of scope
> object.
> (compile_cplus_instance::leave_scope): Likewise.
> (compile_cplus_instance::convert_qualified_base): Compare quals
> to 0.
[...]
> diff --git a/gdb/compile/compile-cplus-types.c b/gdb/compile/compile-cplus-types.c
> index 9425fc6..844c8ce 100644
> --- a/gdb/compile/compile-cplus-types.c
> +++ b/gdb/compile/compile-cplus-types.c
> @@ -259,7 +259,7 @@ compile_cplus_instance::enter_scope (compile_scope &new_scope)
> if (must_push)
> {
> if (debug_compile_cplus_scopes)
> - fprintf_unfiltered (gdb_stdlog, "entering new scope %p\n", new_scope);
> + fprintf_unfiltered (gdb_stdlog, "entering new scope %p\n", &new_scope);
While at it, can you change the use of %p by using %s combined with
host_address_to_string? Using %p triggers an ARI warning.
> @@ -1055,7 +1055,7 @@ compile_cplus_instance::convert_qualified_base (gcc_type base,
> {
> gcc_type result = base;
>
> - if (quals != GCC_CP_REF_QUAL_NONE)
> + if (quals != 0)
> result = plugin ().build_qualified_type (base, quals);
>
> return result;
> --
> 2.7.4
--
Joel