This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
[3.3] warnings in include/xregex2.h
hi everybody,
when i compiled the newest gcc-3.3 snapshot, i got:
in file included from ../../gcc/include/xregex.h:26,
from ../../gcc/libiberty/regex.c:195:
../../gcc/include/xregex2.h:551: warning: ISO C89 does not support `static' or
type qualifiers in parameter array declarators
the line, which caused this:
extern int regexec _RE_ARGS ((const regex_t *__restrict __preg,
const char *__restrict __string, size_t __nmatch,
regmatch_t __pmatch[__restrict_arr],
int __eflags));
the problem seems to be the [__restrict_arr], which is defined as "__restrict"
on my system (gcc 3.2.2).
i'm curious, why is this so? a comment in the same file says (line 533):
"/* GCC 3.1 and later support declaring arrays as non-overlapping
using the syntax array_name[restrict] */"
removing the __restrict_arr in this case fixes the problem.
brg,
Tolga Dalman.