This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: More altivec array initialisation troubles
- From: Daniel Egger <degger at fhm dot edu>
- To: Stan Shebs <shebs at apple dot com>
- Cc: GCC Developer Mailinglist <gcc at gcc dot gnu dot org>,Aldy Hernandez <aldyh at redhat dot com>
- Date: 22 Feb 2002 19:44:56 +0100
- Subject: Re: More altivec array initialisation troubles
- References: <1014397022.13955.3.camel@sonja> <3C7682BC.ECD0E2C4@apple.com>
Am Fre, 2002-02-22 um 18.41 schrieb Stan Shebs:
> > static const vector signed short test4[4] =
> > {
> > {1, 2, 3, 4, 5, 6, 7, 8},
> > {11, 12, 13, 14, 15, 16, 17, 18},
> > {21, 22, 23, 24, 25, 26, 27, 28},
> > {31, 32, 33, 34, 35, 36, 37, 38}
> > };
> This is not how compound literals work, you need the types to
> cast to.
That's the way the motorola modifications to altivec work but it
doesn't necessarily make sense. It's fairly obvious to
write
static const vector signed short test = {1, 2, 3, 4, 5, 6, 7, 8};
and thus as a special case the array above.
--
Servus,
Daniel