-
Notifications
You must be signed in to change notification settings - Fork 225
Closed
Description
Not sure if support of old C89 standard has been cancelled but if this is not that case, the last release has introduced some small violations in modules pcre2_compile.c
and pcre2_script_run.c
. Examples:
pcre2_compile.c: In function 'compile_branch':
pcre2_compile.c:5857:13: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
for (int i = 0; i < 32; i++) pbits[i] |= cbits[(int)i + taboffset];
^
pcre2_compile.c:5857:13: note: use option -std=c99, -std=gnu99, -std=c11 or -std=gnu11 to compile your code
pcre2_compile.c:5859:22: error: redefinition of 'i'
for (int i = 0; i < 32; i++) pbits[i] &= ~cbits[(int)i + taboffset];
^
pcre2_compile.c:5857:22: note: previous definition of 'i' was here
for (int i = 0; i < 32; i++) pbits[i] |= cbits[(int)i + taboffset];
^
pcre2_compile.c:5859:13: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
for (int i = 0; i < 32; i++) pbits[i] &= ~cbits[(int)i + taboffset];
^
pcre2_script_run.c: In function '_pcre2_script_run_8':
pcre2_script_run.c:109:1: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
for (int i = 0; i < FULL_MAPSIZE; i++) require_map[i] = 0;
^
pcre2_script_run.c:109:1: note: use option -std=c99, -std=gnu99, -std=c11 or -std=gnu11 to compile your code
pcre2_script_run.c:248:7: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
for (int i = 0; i < FULL_MAPSIZE; i++)
^
pcre2_script_run.c:285:9: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
for (int i = 0; i < FULL_MAPSIZE; i++) require_map[i] &= map[i];
Please consider to change it. Or feel free to close it without any actions if C89 violations are not an issue any more.
Metadata
Metadata
Assignees
Labels
No labels