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: Valarrays and [altivec] vectors (was Re: [PATCH]: Handle vectormodes in genopinit.c, c-typeck.c)


>>>>> "Joseph" == Joseph S Myers <jsm28@cam.ac.uk> writes:

> On 30 Nov 2001, Gabriel Dos Reis wrote:
>> That is a constraint violation in C++ as well, but then what should
>> happen if that constraint is violated? In C++, it is an undefined
>> behaviour.  What do you propose for C?

> A hard compile-time error.

It should be a compile-time error in C++ as well, wherever possible.  The
problem with that is that the size is not part of the type.  Failing that,
we should throw length_error when we're in constraint-checking mode.

Jason


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