This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH c++ 01/12] linux-ppc-low.c: Remove forward declaration, move ppc_arch_setup lower
- From: Simon Marchi <simon dot marchi at ericsson dot com>
- To: Pedro Alves <palves at redhat dot com>, <gdb-patches at sourceware dot org>
- Cc: Simon Marchi <simon dot marchi at polymtl dot ca>
- Date: Tue, 3 Nov 2015 13:35:09 -0500
- Subject: Re: [PATCH c++ 01/12] linux-ppc-low.c: Remove forward declaration, move ppc_arch_setup lower
- Authentication-results: sourceware.org; auth=none
- References: <1446560804-18858-1-git-send-email-simon dot marchi at ericsson dot com> <5638DB60 dot 7060200 at redhat dot com>
On 15-11-03 11:05 AM, Pedro Alves wrote:
> 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
>
Pushed all 12 patches, with the typo in the title fixed.
Thanks!