]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
PR bootstrap/53459 - unused local typedef when building on altivec
authorDodji Seketeli <dodji@redhat.com>
Tue, 29 May 2012 09:42:39 +0000 (09:42 +0000)
committerDodji Seketeli <dodji@gcc.gnu.org>
Tue, 29 May 2012 09:42:39 +0000 (11:42 +0200)
PR bootstrap/53459
* lex.c (search_line_fast): Avoid unused local typedefs to simulate
a static assertion.

From-SVN: r187947

libcpp/ChangeLog
libcpp/lex.c

index 0d25c4d633fc6424459930fac6eb3384ce8bc018..859c1a43ccec3d8447149b8bd01b16fd18071df1 100644 (file)
@@ -1,3 +1,9 @@
+2012-05-25  Dodji Seketeli  <dodji@redhat.com>
+
+       PR bootstrap/53459
+       * lex.c (search_line_fast): Avoid unused local typedefs to simulate
+       a static assertion.
+
 2012-05-29  Dodji Seketeli  <dodji@redhat.com>
 
        PR preprocessor/53229
index c4dd6035c9bd58af9abc1f4483e6b0d58523d54f..98ee4e92da393d7c88c24e871e6a2d93f7711c48 100644 (file)
@@ -590,10 +590,10 @@ search_line_fast (const uchar *s, const uchar *end ATTRIBUTE_UNUSED)
   {
 #define N  (sizeof(vc) / sizeof(long))
 
-    typedef char check_count[(N == 2 || N == 4) * 2 - 1];
     union {
       vc v;
-      unsigned long l[N];
+      /* Statically assert that N is 2 or 4.  */
+      unsigned long l[(N == 2 || N == 4) ? N : -1];
     } u;
     unsigned long l, i = 0;