GCC vector extensions.

Ian Lance Taylor iant@google.com
Thu Nov 4 18:59:00 GMT 2010


Hariharan Sandanagobalane <hariharans@picochip.com> writes:

> I have a feeling the website is wrong. If you went to
> http://gcc.gnu.org/onlinedocs/gcc/Vector-Extensions.html, it claims
>
> "In C vectors can be subscripted as if the vector were an array with
> the same number of elements and base type. Out of bound accesses
> invoke undefined behavior at runtime. Warnings for out of bound
> accesses for vector subscription can be enabled with -Warray-bounds. "
>
> I went through the gcc source code and the extend.texi does not have
> this statement anymore. Why is that not reflected on the website?

I see that statement in the current source code.  I expect that you are
looking at an older release.

Vector subscripting was added quite recently and is not yet in any gcc
release.  When you read http://gcc.gnu.org/onlinedocs/gcc/ you are
reading the docs for the current development release.  If you look at
http://gcc.gnu.org/onlinedocs/ you can select the documentation
appropriate to the release you are using.  If you started from that
page, you are selecting the manual which follows a note "Some
information may not be applicable to any existing release."

Ian



More information about the Gcc-help mailing list