diff options
author | Dodji Seketeli <dodji@redhat.com> | 2012-05-29 09:42:39 +0000 |
---|---|---|
committer | Dodji Seketeli <dodji@gcc.gnu.org> | 2012-05-29 11:42:39 +0200 |
commit | 53a103d30410e9e31e46576a189fa83c4733c45a (patch) | |
tree | 22ecca7d0d8158b330cd0d3d03f9480bcb1829db /libcpp | |
parent | 6de6b1ec5f4497f41ed0a06c02ca70a262e5084e (diff) | |
download | gcc-53a103d30410e9e31e46576a189fa83c4733c45a.zip gcc-53a103d30410e9e31e46576a189fa83c4733c45a.tar.gz gcc-53a103d30410e9e31e46576a189fa83c4733c45a.tar.bz2 |
PR bootstrap/53459 - unused local typedef when building on altivec
PR bootstrap/53459
* lex.c (search_line_fast): Avoid unused local typedefs to simulate
a static assertion.
From-SVN: r187947
Diffstat (limited to 'libcpp')
-rw-r--r-- | libcpp/ChangeLog | 6 | ||||
-rw-r--r-- | libcpp/lex.c | 4 |
2 files changed, 8 insertions, 2 deletions
diff --git a/libcpp/ChangeLog b/libcpp/ChangeLog index 0d25c4d..859c1a4 100644 --- a/libcpp/ChangeLog +++ b/libcpp/ChangeLog @@ -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 diff --git a/libcpp/lex.c b/libcpp/lex.c index c4dd603..98ee4e9 100644 --- a/libcpp/lex.c +++ b/libcpp/lex.c @@ -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; |