On 01.03.2014 11:05, Philip Martin wrote: > Branko Čibej <br...@wandisco.com> writes: > >> On 28.02.2014 23:57, phi...@apache.org wrote: >>> Author: philip >>> Date: Fri Feb 28 22:57:24 2014 >>> New Revision: 1573106 >>> >>> + AC_LINK_IFELSE([AC_LANG_SOURCE([[int main(){return 0;}]])] >> This bit of source is not valid C90. It should be: int main(void){ ... } > I don't have a copy of the C90 standard but 'int main()' is used in some > of the examples in both the C99 and C++98 standards.
Yes, the semantics changed in C++, where name() means the same as name(void) in C90. The semantics in C99 are the same as in C90; name() means that the function is variadic and takes any number of arguments. However, the 'main' function is explicitly defined to have exactly two forms: int main(void); // or int main(); in C++ and int main(int argc, char *argv[]); The distinction is unimportant as far as the purpose of he configure test is concerned; but a pedantic compiler may warn, or even refuse to accept, the form you use in the test. (FWIW, in C++, you don't need an explicit return statement in 'main', either; running past the end of the function implies an implicit 'return 0;') -- Brane -- Branko Čibej | Director of Subversion WANdisco // Non-Stop Data e. br...@wandisco.com