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 c++ 01/12] linux-ppc-low.c: Remove forward declaration, move ppc_arch_setup lower


On 11/03/2015 02:26 PM, Simon Marchi wrote:
> From: Simon Marchi <simon.marchi@polymtl.ca>
> 
> g++ doesn't like that we forward-declare a variable that is initialized
> later in the file.  It's easy enough to re-order things to fix it.

Yeah, doesn't work in C either with -fno-common.

> 
> Fixes
> 
> /home/simark/src/binutils-gdb/gdb/gdbserver/linux-ppc-low.c:663:28: error: redefinition of âusrregs_info ppc_usrregs_infoâ
>  static struct usrregs_info ppc_usrregs_info =
>                             ^
> /home/simark/src/binutils-gdb/gdb/gdbserver/linux-ppc-low.c:381:28: note: âusrregs_info ppc_usrregs_infoâ previously declared here
>  static struct usrregs_info ppc_usrregs_info;
>                             ^
> 
> gdb/gdbserver/ChangeLog:
> 
> 	* linux-ppc-low.c (ppc_usrregs_info): Remove
> 	forward-declaration.
> 	(ppc_arch_setup): Move lower in file.

OK.

Thanks,
Pedro Alves


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