Valarrays and [altivec] vectors (was Re: [PATCH]: Handle vector modes in genopinit.c, c-typeck.c)

Jason Merrill jason@redhat.com
Wed Dec 12 03:26:00 GMT 2001


>>>>> "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



More information about the Gcc-patches mailing list