Is there a problem with C99/C11?
AntonioCS opened this issue · 6 comments
AntonioCS commented
What is the issue with the int in the for loop declaration? Gcc and Clang both support C99 and C11.
mzer0-yu commented
variable declared within for-loop is visible in the first following line since C11(C++ 11).
e.g.
for(int i=0; ;) {
}
i++;
BUT we are writing C.
AntonioCS commented
C11 is C. The ability do declare and use variables in the for loop declaration simplifies code.
Deleted user commented
With gcc, -std=c99 must be declared. Which was not specified in Makefile.
mzer0-yu commented
OK. Changes will be added to dev branch.
Deleted user commented
Great.
AntonioCS commented
👍