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: Graham Stott <grahams at redhat dot com>
- Cc: GCC Developer Mailinglist <gcc at gcc dot gnu dot org>,Aldy Hernandez <aldyh at redhat dot com>
- Date: 22 Feb 2002 18:18:29 +0100
- Subject: Re: More altivec array initialisation troubles
- References: <1014397022.13955.3.camel@sonja> <3C767B34.53674558@redhat.com>
Am Fre, 2002-02-22 um 18.09 schrieb Graham Stott:
> > 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}
> > };
> Try casting each of the vector initialiser to vectors
>
> {
> {(vector signed short){1, 2, 3, 4, 5, 6, 7, 8}},
> {(vector signed short){11, 12, 13, 14, 15, 16, 17, 18}},
> ; ...
> }
But
static const vector signed short test4[4] =
{
(vector signed short){1, 2, 3, 4, 5, 6, 7, 8},
(vector signed short){11, 12, 13, 14, 15, 16, 17, 18},
(vector signed short){21, 22, 23, 24, 25, 26, 27, 28},
(vector signed short){31, 32, 33, 34, 35, 36, 37, 38}
};
does. This should be fixed anyhow as it's fairly simple to get wrong
and the warning is sort of confusing, not to mention that the
behaviour is not really sensible (at least to me).
--
Servus,
Daniel