This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Replace the block_found global with explicit data-flow
- From: Steve Ellcey <sellcey at imgtec dot com>
- To: Pierre-Marie de Rodat <derodat at adacore dot com>
- Cc: Doug Evans <xdje42 at gmail dot com>, GDB Patches <gdb-patches at sourceware dot org>, Pedro Alves <palves at redhat dot com>
- Date: Mon, 3 Aug 2015 09:38:42 -0700
- Subject: Re: [PATCH] Replace the block_found global with explicit data-flow
- Authentication-results: sourceware.org; auth=none
- References: <55BC8CA9 dot 3070505 at adacore dot com>
- Reply-to: <sellcey at imgtec dot com>
On Sat, 2015-08-01 at 11:08 +0200, Pierre-Marie de Rodat wrote:
> On 08/01/2015 10:57 AM, Pierre-Marie de Rodat wrote:
> > This is pushed, now.
>
> Sergio's buildbot detected a compilation error:
>
> ../../binutils-gdb/gdb/ft32-tdep.c: In function 'ft32_skip_prologue':
> ../../binutils-gdb/gdb/ft32-tdep.c:253:8: error: incompatible types when
> assigning to type 'struct symbol *' from type 'struct block_symbol'
> sym = lookup_symbol (func_name, NULL, VAR_DOMAIN, NULL);
>
> Strange, I don't have this problem locally. Investigating how the
> buildbot's build is different (mhm probably this --enable-targets=all).
I am seeing a different build error that I think is due to this patch.
I only see it on an old CentOS 5.11 system with GCC 4.1.2, and only when
I build gdb as a 32 bit executable instead of a 64 bit executable.
cc1: warnings being treated as errors
/scratch/sellcey/repos/gdb-build/src/binutils-gdb/gdb/cp-namespace.c: In function 'cp_lookup_symbol_via_imports':
/scratch/sellcey/repos/gdb-build/src/binutils-gdb/gdb/cp-namespace.c:482: warning: 'sym.block' may be used uninitialized in this function
It looks like sym.symbol is always initialized, but sym.block is not
initialized at the beginning of the function. I think it is always
initialized when used but GCC (at least this version of GCC) cannot seem
to figure that out.
Steve Ellcey
sellcey@imgtec.com