Thread overview | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
February 22, 2006 main | ||||
---|---|---|---|---|
| ||||
Is "void main()" legal now? It used to cause an access violation (on Win32), but now appears to be allowed. Is it? |
February 22, 2006 Re: main | ||||
---|---|---|---|---|
| ||||
Posted in reply to John C | John C wrote:
> Is "void main()" legal now? It used to cause an access violation (on Win32), but now appears to be allowed. Is it?
Yes.
Sean
|
February 22, 2006 Re: main | ||||
---|---|---|---|---|
| ||||
Posted in reply to John C | John C wrote: > Is "void main()" legal now? It used to cause an access violation (on Win32), but now appears to be allowed. Is it? It should be, Walter said it was fixed in DMD 0.147 http://www.digitalmars.com/d/changelog.html#new0147: # Fixed D.bugs/5851, D.bugs/2677, D.bugs/2853, D/13127 --anders |
February 23, 2006 Re: main | ||||
---|---|---|---|---|
| ||||
Posted in reply to John C | "John C" <johnch_atms@hotmail.com> wrote in message news:dthu9g$28gc$1@digitaldaemon.com... > Is "void main()" legal now? It used to cause an access violation (on Win32), It did? I've been using void main() for ages on Windows.. |
February 23, 2006 Re: main | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jarrett Billingsley | "Jarrett Billingsley" <kb3ctd2@yahoo.com> wrote in message news:dtj0de$i60$1@digitaldaemon.com... > "John C" <johnch_atms@hotmail.com> wrote in message news:dthu9g$28gc$1@digitaldaemon.com... >> Is "void main()" legal now? It used to cause an access violation (on Win32), > > It did? I've been using void main() for ages on Windows.. Maybe my memory's going. |
February 23, 2006 Re: main | ||||
---|---|---|---|---|
| ||||
Posted in reply to John C | On Thu, 23 Feb 2006 01:24:52 -0000, John C wrote: > "Jarrett Billingsley" <kb3ctd2@yahoo.com> wrote in message news:dtj0de$i60$1@digitaldaemon.com... >> "John C" <johnch_atms@hotmail.com> wrote in message news:dthu9g$28gc$1@digitaldaemon.com... >>> Is "void main()" legal now? It used to cause an access violation (on Win32), >> >> It did? I've been using void main() for ages on Windows.. > > Maybe my memory's going. I think the change for 'void main(){}' is that DMD now ensures that zero is returned to the operating system. So now its the same as 'int main() {return 0;}' -- Derek (skype: derek.j.parnell) Melbourne, Australia "Down with mediocracy!" 23/02/2006 3:18:08 PM |
February 23, 2006 Re: main | ||||
---|---|---|---|---|
| ||||
Posted in reply to Derek Parnell | Derek Parnell wrote:
> On Thu, 23 Feb 2006 01:24:52 -0000, John C wrote:
>
>
>> "Jarrett Billingsley" <kb3ctd2@yahoo.com> wrote in message news:dtj0de$i60$1@digitaldaemon.com...
>>
>>> "John C" <johnch_atms@hotmail.com> wrote in message news:dthu9g$28gc$1@digitaldaemon.com...
>>>
>>>> Is "void main()" legal now? It used to cause an access
>>>> violation (on Win32),
>>>
>>> It did? I've been using void main() for ages on Windows..
>>
>> Maybe my memory's going.
>
>
> I think the change for 'void main(){}' is that DMD now ensures that
> zero is returned to the operating system. So now its the same as 'int
> main() {return 0;}'
Yes. And I too don't remember when this was fixed. Probably like 6 months ago.
|
February 23, 2006 Re: main | ||||
---|---|---|---|---|
| ||||
Posted in reply to Georg Wrede | Georg Wrede wrote:
> Derek Parnell wrote:
>> I think the change for 'void main(){}' is that DMD now ensures that
>> zero is returned to the operating system. So now its the same as 'int
>> main() {return 0;}'
>
> Yes. And I too don't remember when this was fixed. Probably like 6 months ago.
Actually, in DMD 0.146 - two weeks back. <g>
|
Copyright © 1999-2021 by the D Language Foundation