[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r1573106 - /subversion/trunk/build/ac-macros/compiler.m4

From: Philip Martin <philip.martin_at_wandisco.com>
Date: Sun, 02 Mar 2014 02:15:13 +0000

Branko Čibej <brane_at_wandisco.com> writes:

> 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.

I have no problem with your change but I don't believe a compiler would
reject 'int main()'. The standard explicitly allows declarations
"equivalent" to the two declarations you give and I believe 'int main()'
qualifies, particularly since some of the examples in the standard use
'int main()'.

-- 
Philip Martin | Subversion Committer
WANdisco // *Non-Stop Data*
Received on 2014-03-02 03:15:47 CET

This is an archived mail posted to the Subversion Dev mailing list.