This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] PR bootstrap/53459 - unused local typedef when building on altivec
On Fri, May 25, 2012 at 12:27:23PM -0400, Jason Merrill wrote:
> On 05/25/2012 08:46 AM, Dominique Dhumieres wrote:
> >I certainly prefer this alternative (the use of extern for that purpose
> >being extremely confusing for a fortraner;-). However, if my test is valid,
> >if N is not equal to 2 or 4, one gets the following error
> >
> >error: size of array 'l' is negative
> >
> >Would not it be better to have an explicit test of N being 2 or 4, and an error
> >of the kind "the vector size has to be the size of 2 or 4 long" if not?
>
> There's no way to tell the compiler to emit that kind of error (in
> C; that's what C++11 static_assert is for).
C11 has _Static_assert.
Jakub