Re: [PATCH] Replace the block_found global with explicit data-flow

Pedro Alves
2015-08-03T17:12:31Z

Hi Steve,

On 08/03/2015 05:38 PM, Steve Ellcey wrote:

> 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.

That's been fixed meanwhile:

https://sourceware.org/ml/gdb-patches/2015-08/msg00018.html

Thanks,
Pedro Alves