Re: vector bug?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



v4si a = *(v4si*)ins, b = {1, 2, 3, 4}, c;

*(v4si*)vals = c;

You can't do this. Your accessing an object of one type (int) as an other type (v4si).

You'll have to go through a union to do this safely
(this is a GCC extension).  Like:

	union { v4si v; int i[4]; } convert;
	convert.v = c;

...and then print convert.i[0] etc.


Segher



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux