This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: conversions between vectors
- From: "Joseph S. Myers" <jsm28 at cam dot ac dot uk>
- To: Aldy Hernandez <aldyh at redhat dot com>
- Cc: Richard Henderson <rth at redhat dot com>, Alexandre Oliva <aoliva at redhat dot com>, gcc patches <gcc-patches at gcc dot gnu dot org>
- Date: Sat, 22 Dec 2001 12:40:14 +0000 (GMT)
- Subject: Re: conversions between vectors
On 21 Dec 2001, Aldy Hernandez wrote:
> "vector signed int". Also, assignments between "signed int" and
> "unsigned int" are allowed even in pedantic mode. So, IMO the above
And this (implict signed/unsigned conversions) is a source of security
holes.
> And wrt casting, it makes syntatic sense to allow casts (as they do
> now), even if valarrays don't allow it, as long as the vector size is
> the same for both types. I don't think we should enforce a pedantic
> 1:1 relationship wrt valarrays and vector types.
The correspondence with valarrays was to some extent because those are a
well-developed set of semantics known to work. Start by documenting in
the manual the correspondence with valarrays and, for C programmers, what
this means, and what parts of it are implemented. Only then propose
specific extensions, with precise documentation for what they mean and
when they are allowed, and justification in each case.
--
Joseph S. Myers
jsm28@cam.ac.uk