Mercurial > hg > octave-lojdl > gnulib-hg
comparison lib/regex_internal.h @ 7689:b4806b1ec9e4
Fix some incompatibilities with gcc -ansi -pedantic.
* lib/regex.h (__restrict_arr): Don't use the [restrict] syntax
if compiling pedantically with GCC, unless it's C99 or later.
Don't trust sys/cdefs.h's definition of __restrict_arr, either, as
it mishandles gcc -ansi -pedantic as well.
* lib/regex_internal.h (re_token_t): Don't use enum bitfields
if gcc -pedantic.
* lib/regexec.c (check_node_accept_bytes): Don't use auto
initializers for struct if -pedantic, unless it's C99 or later.
author | Paul Eggert <eggert@cs.ucla.edu> |
---|---|
date | Mon, 27 Nov 2006 07:15:26 +0000 |
parents | 19c2e5121b2f |
children | 47b81ff5eb33 |
comparison
equal
deleted
inserted
replaced
7688:abc20b5ad112 | 7689:b4806b1ec9e4 |
---|---|
346 re_charset_t *mbcset; /* for COMPLEX_BRACKET */ | 346 re_charset_t *mbcset; /* for COMPLEX_BRACKET */ |
347 #endif /* RE_ENABLE_I18N */ | 347 #endif /* RE_ENABLE_I18N */ |
348 Idx idx; /* for BACK_REF */ | 348 Idx idx; /* for BACK_REF */ |
349 re_context_type ctx_type; /* for ANCHOR */ | 349 re_context_type ctx_type; /* for ANCHOR */ |
350 } opr; | 350 } opr; |
351 #if __GNUC__ >= 2 | 351 #if __GNUC__ >= 2 && !__STRICT_ANSI__ |
352 re_token_type_t type : 8; | 352 re_token_type_t type : 8; |
353 #else | 353 #else |
354 re_token_type_t type; | 354 re_token_type_t type; |
355 #endif | 355 #endif |
356 unsigned int constraint : 10; /* context constraint */ | 356 unsigned int constraint : 10; /* context constraint */ |