Complicated dg test cases
Michael Matz
matz@suse.de
Mon Feb 9 19:44:00 GMT 2004
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.
More information about the Gcc
mailing list