More altivec array initialisation troubles

Graham Stott grahams@redhat.com
Fri Feb 22 09:13:00 GMT 2002


Daniel,

Daniel Egger wrote:
> 
> Hija, this one is particularly lovely:
> 
> 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}},
;	...
}

> 
[snip]
> Servus,
>        Daniel
Graham



More information about the Gcc mailing list