Branko Čibej <[email protected]> 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*

Reply via email to