[PATCH] PR bootstrap/53459 - unused local typedef when building on altivec

Jason Merrill jason@redhat.com
Fri May 25 16:27:00 GMT 2012


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).

Jason



More information about the Gcc-patches mailing list