This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC] Add support for PPC Altivec registers in gcore
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: schwab at suse dot de (Andreas Schwab)
- Cc: cseo at linux dot vnet dot ibm dot com (Carlos Eduardo Seo), gdb-patches at sourceware dot org (GDB Patches Mailing List)
- Date: Tue, 25 Mar 2008 22:53:23 +0100 (CET)
- Subject: Re: [RFC] Add support for PPC Altivec registers in gcore
Andreas Schwab wrote:
> "Ulrich Weigand" <uweigand@de.ibm.com> writes:
>
> > What exactly seems to be the problem? The following
> > code should be valid C, and compiles fine with GCC:
>
> Your GCC is buggy.
Interesting. GCC 3.4.6 accepts it; GCC 4.1.1 does indeed
reject it with:
error: array type has incomplete element type
> > struct core_regset_section;
> > extern struct core_regset_section default_regset_sections[];
>
> The C standard does not allow this. An array declaration requires a
> complete element type.
It looks like I was indeed misremembering this. I thought an
extern declaration should be OK, as long as the declared identifier
is only ever used in contexts where it decays to a pointer ...
Bye,
Ulrich
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com