diff options
author | DJ Delorie <dj@delorie.com> | 2002-04-17 01:03:04 +0000 |
---|---|---|
committer | DJ Delorie <dj@delorie.com> | 2002-04-17 01:03:04 +0000 |
commit | 60f12ff933e3e080896cf72f2e07e762b492023f (patch) | |
tree | 56c11a1102a61c83d2d4d1d9944d51f07d7bbd44 /include/xregex2.h | |
parent | 9529da73a127c9ba99091599b5454384fc0c48e8 (diff) | |
download | gdb-60f12ff933e3e080896cf72f2e07e762b492023f.tar.gz |
merge from gcc
Diffstat (limited to 'include/xregex2.h')
-rw-r--r-- | include/xregex2.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/include/xregex2.h b/include/xregex2.h index b9c2d97cce1..2991daf9bcf 100644 --- a/include/xregex2.h +++ b/include/xregex2.h @@ -529,10 +529,16 @@ extern int re_exec _RE_ARGS ((const char *)); # endif # endif #endif -/* For now unconditionally define __restrict_arr to expand to nothing. - Ideally we would have a test for the compiler which allows defining - it to restrict. */ -#define __restrict_arr + +/* GCC 3.1 and later support declaring arrays as non-overlapping + using the syntax array_name[restrict] */ +#ifndef __restrict_arr +# if ! (3 < __GNUC__ || (3 == __GNUC__ && 1 <= __GNUC_MINOR__)) || defined (__GNUG__) +# define __restrict_arr +# else +# define __restrict_arr __restrict +# endif +#endif /* POSIX compatibility. */ extern int regcomp _RE_ARGS ((regex_t *__restrict __preg, |