This is the mail archive of the gcc-patches@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: 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


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