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
- From: dominiq at lps dot ens dot fr (Dominique Dhumieres)
- To: jakub at redhat dot com, dodji at redhat dot com
- Cc: tromey at redhat dot com, jason at redhat dot com, gcc-patches at gcc dot gnu dot org, dominiq at lps dot ens dot fr
- Date: Fri, 25 May 2012 14:46:37 +0200
- Subject: Re: [PATCH] PR bootstrap/53459 - unused local typedef when building on altivec
- References: <m3ehq95lyv.fsf@redhat.com> <87pq9t70f7.fsf@fleche.redhat.com> <m3mx4w4r3p.fsf@redhat.com> <20120525090413.GU16117@tyan-ft48-01.lab.bos.redhat.com>
> 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