When building with -Wstrict-prototypes, several warnings of the following form are emitted:
In file included from src/ctjhai/minimum-weight-gf2.c:40:
src/ctjhai/popcount.h:26:19: warning: a function declaration
without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
void init_popcount();
^
void
What's the problem? It turns out that (despite all compilers accepting it for basically forever) a declaration of foo() in C doesn't mean "no arguments." Instead, it means that the number and type of arguments is unspecified. Here, the warning is simply complaining that init_popcount should either have a prototype specifying the arguments, or itself be declared init_popcount(void).
This isn't a big deal today, but C23 will likely make this an error. We're trying to report these issues early so that there isn't a build armageddon when the new standard is released, see e.g. https://wiki.gentoo.org/wiki/Modern_C_porting
When building with
-Wstrict-prototypes
, several warnings of the following form are emitted:What's the problem? It turns out that (despite all compilers accepting it for basically forever) a declaration of
foo()
in C doesn't mean "no arguments." Instead, it means that the number and type of arguments is unspecified. Here, the warning is simply complaining thatinit_popcount
should either have a prototype specifying the arguments, or itself be declaredinit_popcount(void)
.This isn't a big deal today, but C23 will likely make this an error. We're trying to report these issues early so that there isn't a build armageddon when the new standard is released, see e.g. https://wiki.gentoo.org/wiki/Modern_C_porting