Mercurial > hg > octave-lojdl > gnulib-hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
17422:08883714ab3e | 17423:6105f1dfb98e |
---|---|
584 it the same all the time. UTF-8 is the preferred encoding so this is | 584 it the same all the time. UTF-8 is the preferred encoding so this is |
585 a worthwhile optimization. */ | 585 a worthwhile optimization. */ |
586 static const bitset_t utf8_sb_map = | 586 static const bitset_t utf8_sb_map = |
587 { | 587 { |
588 /* Set the first 128 bits. */ | 588 /* Set the first 128 bits. */ |
589 # ifdef __GNUC__ | 589 # if defined __GNUC__ && !defined __STRICT_ANSI__ |
590 [0 ... 0x80 / BITSET_WORD_BITS - 1] = BITSET_WORD_MAX | 590 [0 ... 0x80 / BITSET_WORD_BITS - 1] = BITSET_WORD_MAX |
591 # else | 591 # else |
592 # if 4 * BITSET_WORD_BITS < ASCII_CHARS | 592 # if 4 * BITSET_WORD_BITS < ASCII_CHARS |
593 # error "bitset_word_t is narrower than 32 bits" | 593 # error "bitset_word_t is narrower than 32 bits" |
594 # elif 3 * BITSET_WORD_BITS < ASCII_CHARS | 594 # elif 3 * BITSET_WORD_BITS < ASCII_CHARS |