This is the mail archive of the
mailing list for the GCC project.
Re: Valarrays and [altivec] vectors (was Re: [PATCH]: Handle vectormodes in genopinit.c, c-typeck.c)
- From: Jason Merrill <jason at redhat dot com>
- To: "Joseph S. Myers" <jsm28 at cam dot ac dot uk>
- Cc: Gabriel Dos Reis <gdr at codesourcery dot com>, Phil Edwards <pedwards at disaster dot jaj dot com>, Per Bothner <per at bothner dot com>, Daniel Berlin <dan at cgsoftware dot com>, <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 04 Dec 2001 17:13:24 +0000
- Subject: Re: Valarrays and [altivec] vectors (was Re: [PATCH]: Handle vectormodes in genopinit.c, c-typeck.c)
- References: <Pine.LNX.email@example.com>
>>>>> "Joseph" == Joseph S Myers <firstname.lastname@example.org> 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.