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: [PATCH] PR bootstrap/53459 - unused local typedef when building on altivec


> Alternatively you could put the static assertion with the comment
> into the l field, i.e.
>         /* Statically assert that N is 2 or 4.  */
>         unsigned long l[(N == 2 || N == 4) ? N : -1];

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?

I'll test the above change tonight: allow for ~14h for a clean bootstrap and

Dominique


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