This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: More altivec array initialisation troubles


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}
> };

This is not how compound literals work, you need the types to
cast to.  But the example does have a reasonable intuitive
interpretation, so I could see extending the initializer
machinery to make it work.  Not sure how hard to implement,
this would be coming through general initializer code rather
than the compound literal path.

Stan


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]