[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:56:42 +0000

Branko Čibej <brane_at_wandisco.com> writes:

> On 02.03.2014 03:15, Philip Martin wrote:
>> 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()'.
>
> The standard allows the compiler to accept other, implementation-defined
> signatures, but it does not require it to accept them. That's not the
> same as allowing equivalent declarations. A compiler is perfectly free
> to raise an error if it sees main defined in anything except the two
> forms explicitly mentioned in the standard.

"implementation-defined" is distinct from "equivalent".

5.1.2.2.1

  "It shall be defined with ...

   or with ...

   or equivalent; or in some implementation-defined manner."

So an "equivalent" definition to the two is required to be accepted.
Now we could quibble about what exactly is "equivalent" but anything
that is has to be accepted.

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

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.