C99 code : -std=c99 should be specified in CFLAGS
miniupnp opened this issue · comments
Thomas BERNARD commented
see :
gcc -Werror=implicit-function-declaration -Wmissing-declarations -Wall -Wextra -Wno-unused-parameter -Og -Wall -ggdb3 -g3 -I. -DFLIP_ENDIAN_HACK -DPSYS_DEBUGGER -DGAME_CHEATS -DENABLE_DEBUGUI -I/usr/include/SDL2 -D_REENTRANT -Wmissing-prototypes -c -o psys/psys_debug.o psys/psys_debug.c
psys/psys_debug.c: In function ‘psys_print_info’:
psys/psys_debug.c:176:13: error: ‘for’ loop initial declarations are only allowed in C99 mode
for (int x = 0; x < op->num_out; ++x) {
^
psys/psys_debug.c:176:13: note: use option -std=c99 or -std=gnu99 to compile your code
https://travis-ci.org/miniupnp/sundog/builds/527263027
But maybe you prefer to change the code to make it C90 compliant ?
Thomas BERNARD commented
fixed with 4d01c78
laanwj commented
But maybe you prefer to change the code to make it C90 compliant ?
I think that was the original goal, but, I'm fine with adding the flag, requiring C99 (at least this feature) is fine nowadays.