Re: Why is it taking so long?

From: Dan Pop (Dan.Pop_at_cern.ch)
Date: 03/30/04


Date: 30 Mar 2004 11:47:05 GMT

In <c4a4i5$2ge5f3$1@uni-berlin.de> ram@zedat.fu-berlin.de (Stefan Ram) writes:

>"jacob navia" <jacob@jacob.remcomp.fr> writes:
>>I have done my best. I have written most of the functions in the math
>>library from scratch.
>
> Since ISO/IEC 9899:1999 (E) defines a return value for "main",
> if the control reaches the final "}", the
>
>Warning example.c: 3 missing return value
>
> possibly might be removed as a default for "main", or possibly
> be removed if using an "-ansic99" option or so?

I like the warning. Just because the standard allows something, it
doesn't automatically mean that this something is a good thing and
should be encouraged.

It's my guess that this feature was introduced because far too many
clueless/careless people didn't bother to return anything from main.
They do deserve the warning, even if C99 takes care of their carelessness.

Dan

-- 
Dan Pop
DESY Zeuthen, RZ group
Email: Dan.Pop@ifh.de


Relevant Pages

  • Re: The C language on Mars
    ... >and the compiler failed to pick it up as a warning or error. ... It's an urban legend and you didn't even get it right. ... responsible for the loss of a NASA space mission are more complex. ... Dan Pop ...
    (comp.lang.c)
  • Re: help with type-punned warning please
    ... It's just with the newer version of gcc ... >that I'm getting this warning. ... >I'm not arguing, I just haven't had the time or opportunity to keep up to ... Dan Pop ...
    (comp.lang.c)
  • Re: Is it standard and practical to use long long types?
    ... >> But the standard doesn't say you can't issue a warning. ... compiler writer is excessively picky. ... Dan Pop ...
    (comp.lang.c)
  • Re: Programming Puzzle
    ... >Well, you should, depending on compiler flags. ... Add a -std=c99 to your gcc invocation and the warning goes away. ... My point was that it is sheer nonsense to say "you'll get a warning about ... Dan Pop ...
    (comp.lang.c)
  • Re: Is it standard and practical to use long long types?
    ... mainis defined as returning int, but it doesn't return anything at ... Methinks a warning is badly needed. ... Dan Pop ...
    (comp.lang.cpp)