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: Vector indexing patch


On Fri, Jun 4, 2010 at 11:39 PM, Andrew Pinski <pinskia@gmail.com> wrote:
> On Tue, Jun 1, 2010 at 12:21 PM, Artem Shinkarov
> <artyom.shinkaroff@gmail.com> wrote:
>
> + ? ? ?error_at (loc, "index value is out of bound");
>
> That is wrong. ?The Cell C/C++ language document says out of bounds
> accesses are undefined (that is at runtime).

I think we should implement whatever OpenCL specs and disregard
whatever the (dead) Cell C/C++ language docs say.  The project is
to improve GCCs generic vector facility, not to implement the Cell
language spec.

But of course the above could be a pedwarn (though you'll get
stmt verification errors if you build a BIT_FIELD_REF with out-of-bounds
indices - so we'd need to emit sth like a zero index for out-of-bound accesses).

Richard.

> Thanks,
> Andrew Pinski
>


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