Re: The_Sage & void main()
In article <044fnvohrorgrq m7d1gbe49n49jmn 1mkqj@4ax.com>,
The_Sage <theeSage@azrmc i.net> wrote:[color=blue][color=green]
>>Reply to article by: comeau@panix.co m (Greg Comeau)
>>Date written: 27 Sep 2003 20:09:04 -0400
>>MsgID:<bl58r0 $e1n$1@panix1.p anix.com>[/color]
>[color=green][color=darkred]
>>>.... listed all the C and
>>>C++ compilers that used void main() in BOTH C and C++. In fact, if you could
>>>learn to click on the link they gave to Microsoft, you would see where
>>>Microsofts online documenation for their C++ compiler uses void main().[/color][/color]
>[color=green]
>>Yes, but the problem is that you have to also define the
>>context of such uses, as I clearly explained in another message.
>>For instance, with Comeau C++, if I have:[/color]
>[color=green]
>>//voidmain.cpp, this is supposed to be Standard C++ code
>>void main()
>>{
>>}[/color]
>
>No, that is your belief, not what the standard states. You aren't the standard
>so it doesn't matter what you believe.[/color]
So coming full circle, you are not the standard either,
so it doesn't matter what you believe.
And for that matter, none of the vendors who reject the
code in strictly conforming mode aren't the standard either,
so it doesn't matter what they believe and have implemented.
That said, actually, I can argue that I and the other vendors
are the standard, since we wrote it.
[color=blue]
>I like void main() and I hope all the major compiler manufacturers
>continue to provide it for their customers like me.[/color]
And no doubt they will. Certainly we will continue to support
it with Comeau C++. However, as I said, if we're talking about
a strictly conforming hosted situation, we will continue to
issue a diagnostic, by default. And the other compilers you
mention no doubt will continue to issue a diagnostic in that
mode too. In Comeau, we actually let you disable this
diagnostic even in strict mode, but to be honest, making
such a run would be super super rare.
[color=blue]
>Like I pointed out to poor little David,
>there is no point in returning anything from main()
>since once you exit main(),
>that's it -- there is nothing to read your int.[/color]
That need not be so. Among many other situations, we write
UNIX and Windows programs all the time that reads it.
That's why it's there, some programs do want to read it.
Of course, some may not care.
--
Greg Comeau/4.3.3:Full C++03 core language + more Windows backends
Comeau C/C++ ONLINE ==> http://www.comeaucomputing.com/tryitout
World Class Compilers: Breathtaking C++, Amazing C99, Fabulous C90.
Comeau C/C++ with Dinkumware's Libraries... Have you tried it?
In article <044fnvohrorgrq m7d1gbe49n49jmn 1mkqj@4ax.com>,
The_Sage <theeSage@azrmc i.net> wrote:[color=blue][color=green]
>>Reply to article by: comeau@panix.co m (Greg Comeau)
>>Date written: 27 Sep 2003 20:09:04 -0400
>>MsgID:<bl58r0 $e1n$1@panix1.p anix.com>[/color]
>[color=green][color=darkred]
>>>.... listed all the C and
>>>C++ compilers that used void main() in BOTH C and C++. In fact, if you could
>>>learn to click on the link they gave to Microsoft, you would see where
>>>Microsofts online documenation for their C++ compiler uses void main().[/color][/color]
>[color=green]
>>Yes, but the problem is that you have to also define the
>>context of such uses, as I clearly explained in another message.
>>For instance, with Comeau C++, if I have:[/color]
>[color=green]
>>//voidmain.cpp, this is supposed to be Standard C++ code
>>void main()
>>{
>>}[/color]
>
>No, that is your belief, not what the standard states. You aren't the standard
>so it doesn't matter what you believe.[/color]
So coming full circle, you are not the standard either,
so it doesn't matter what you believe.
And for that matter, none of the vendors who reject the
code in strictly conforming mode aren't the standard either,
so it doesn't matter what they believe and have implemented.
That said, actually, I can argue that I and the other vendors
are the standard, since we wrote it.
[color=blue]
>I like void main() and I hope all the major compiler manufacturers
>continue to provide it for their customers like me.[/color]
And no doubt they will. Certainly we will continue to support
it with Comeau C++. However, as I said, if we're talking about
a strictly conforming hosted situation, we will continue to
issue a diagnostic, by default. And the other compilers you
mention no doubt will continue to issue a diagnostic in that
mode too. In Comeau, we actually let you disable this
diagnostic even in strict mode, but to be honest, making
such a run would be super super rare.
[color=blue]
>Like I pointed out to poor little David,
>there is no point in returning anything from main()
>since once you exit main(),
>that's it -- there is nothing to read your int.[/color]
That need not be so. Among many other situations, we write
UNIX and Windows programs all the time that reads it.
That's why it's there, some programs do want to read it.
Of course, some may not care.
--
Greg Comeau/4.3.3:Full C++03 core language + more Windows backends
Comeau C/C++ ONLINE ==> http://www.comeaucomputing.com/tryitout
World Class Compilers: Breathtaking C++, Amazing C99, Fabulous C90.
Comeau C/C++ with Dinkumware's Libraries... Have you tried it?
Comment