Mail Archives: djgpp/1997/05/25/12:02:26
On 25 May 1997 13:15:55 GMT, nikki <nikki AT gameboutique DOT co> wrote:
> > because in standard C, main MUST return int!
^^^^^^^^
> why pray?
Because that is what the standard says. :)
> void main() has always worked before. works fine under gcc, cc and
> every other c compiler i've ever touched. what's with the '*must*
> return an int' stuff?
He said in _standard_ c it must do so. That many compilers implement
nonstandard extensions (in this case to support legacy code) does not
make them standard. For example, many compilers support // as a
comment in C. While this will certainly be a part of the next
standard (C9X), /**/ is currently the only way to specify a comment,
according to the existing standard[s].
I believe someone posted the relevant section of the standard a short
while ago.
N.
-==(UDIC)==-
"For once I myself saw with my own eyes the Sybil at Cumae hanging
in a cage, and when the boys said to her, 'Sybil, what do you want?'
she replied, 'I want to die.'"
- From the _Satyricon_ by Petronius
- Raw text -