This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Complicated dg test cases


Hi,

On Mon, 9 Feb 2004, Segher Boessenkool wrote:

> But yes, I agree with you that adding the "return 0;" would be a nice
> cleanup, not only to reduce "risks" but also just for style points.

It's a cleanup only in C99 (and C++).  The implicit return 0 was not in 
C90 and indeed GCC goes to a certain extent to only add the implicit 
return 0 in main() in C99 mode or if the target wants this by default 
(only s390 basically).  In fact if you simply compile a program like

int main() { int i = 7; i *= 7; }

without optimization or any other params, it's return value will be 49 on 
i386.  So no, it's not a cleanup at all.


Ciao,
Michael.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]