diff lib/regcomp.c @ 17423:6105f1dfb98e

c-ctype, regex, verify: port to gcc -std=c90 -pedantic Avoid constructions that are rejected by gcc -std=c90 -pedantic. This fixes a porting bug I recently reintroduced in regex, and some other instances that I discovered while testing the fix. * lib/c-ctype.h [__STRICT_ANSI__]: Avoid ({ ... }). * lib/regcomp.c (utf8_sb_map) [__STRICT_ANSI__]: Avoid [0 ... N] = E. * lib/regex_internal.h [!_LIBC && GNULIB_LOCK]: Do not use a macro with an empty argument if this is a pedantic pre-C99 GCC. * lib/verify.h: Do not use _Static_assert if this is a pedantic pre-C11 GCC.
author Paul Eggert <eggert@cs.ucla.edu>
date Wed, 29 May 2013 18:48:09 -0700
parents 020c917cba9d
children
line wrap: on
line diff
--- a/lib/regcomp.c
+++ b/lib/regcomp.c
@@ -586,7 +586,7 @@
 static const bitset_t utf8_sb_map =
 {
   /* Set the first 128 bits.  */
-# ifdef __GNUC__
+# if defined __GNUC__ && !defined __STRICT_ANSI__
   [0 ... 0x80 / BITSET_WORD_BITS - 1] = BITSET_WORD_MAX
 # else
 #  if 4 * BITSET_WORD_BITS < ASCII_CHARS