A developer may want to test his software with -Werror=old-style-definition (in particular because such definitions could be a real bug in the software). But configure fails because autoconf (version 2.69) generates such a function definition. For instance:
[...] configure:4069: checking whether the C compiler works configure:4130: gcc -O2 -Wall -Wold-style-declaration -Wold-style-definition -Wmissing-parameter-type -Wmissing-prototypes -Wmissing-declarations -Wmissing-field-initializers -Werror conftest.c >&5 conftest.c: In function 'main': conftest.c:12:1: error: old-style function definition [-Werror=old-style-definition] main () ^ cc1: all warnings being treated as errors configure:4130: $? = 1 configure:4144: result: no configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "MPFR" | #define PACKAGE_TARNAME "mpfr" | #define PACKAGE_VERSION "3.2.0-dev" | #define PACKAGE_STRING "MPFR 3.2.0-dev" | #define PACKAGE_BUGREPORT "" | #define PACKAGE_URL "" | #define MPFR_USE_LOGGING 1 | /* end confdefs.h. */ | | int | main () | { | | ; | return 0; | } configure:4144: error: in `/home/vlefevre/software/mpfr': configure:4144: error: C compiler cannot create executables See `config.log' for more details [...] Are there still compilers that fail on "int main(void) { ... }"? In any case, certainly not when the compiler has been recognized as gcc (like here). Also reported as Debian bug 734104: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=734104 BTW, this old-style definition also makes configure fail with CompCert (http://compcert.inria.fr/). -- Vincent Lefèvre <vinc...@vinc17.net> - Web: <http://www.vinc17.net/> 100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/> Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)