|
From: | Nico R. |
Subject: | AC_LANG_PROGRAM(C): function 'main' without prototype |
Date: | Tue, 24 Jun 2008 20:14:44 +0200 |
User-agent: | Thunderbird 2.0.0.14 (X11/20080505) |
Hello!When I tried to compile glibc-2.6.1 (with NPTL support) with CFLAGS including ‘-Wstrict-prototypes’, I noticed that a configure test failed which should have succeeded. I could track the problem down to AC_LANG_PROGRAM(C) in c.m4 from autoconf:
AC_LANG_PROGRAM(C) uses a ‘main’ function without a prototype. If CFLAGS contains ‘-Werror’ (it does in my case, because the configure script in the glibc package adds it), a test using AC_LANG_PROGRAM(C), for example AC_LINK_IFELSE, fails.
Shouldn’t the line main () be main (void)instead? Or may this cause problems with some compilers? Should ‘-Wstrict-prototypes’ be removed from CFLAGS instead? And should this be fixed in autoconf or should I report a bug against glibc?
I examined autoconf-2.61; the problem may be present in other versions as well.
Thanks -- Nico
[Prev in Thread] | Current Thread | [Next in Thread] |