diff options
author | davem <davem@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-04-17 00:12:54 +0000 |
---|---|---|
committer | davem <davem@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-04-17 00:12:54 +0000 |
commit | dc43d83d2b8ab97d4c2b6c6a1017fbec8fbe8941 (patch) | |
tree | 067c2f3de87d9098fd0b875c93a0dbac85ce1efb /include/xregex2.h | |
parent | 26adc8a4c7687a890a12fd44dc42428b2601521a (diff) | |
download | gcc-dc43d83d2b8ab97d4c2b6c6a1017fbec8fbe8941.tar.gz |
2002-04-16 David S. Miller <davem@redhat.com>
* xregex2.h (__restrict_arr): Define to __restrict on GCC
3.1 and later. Do not redefine.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@52383 138bc75d-0d04-0410-961f-82ee72b054a4
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, |