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] Fix compile-cplus-types.c build errors


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


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