This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Complicated dg test cases
On Mon, Feb 09, 2004 at 06:19:55PM +0100, Segher Boessenkool wrote:
> >> so it's not necessary to explicitly return 0 (at least, in C99).
> >
> > I think that's not something to be relied on in a compatibility suite.
>
> Well, you can't really rely on _anything_ -- there is no way of testing
> _only_ the feature you're trying to test.
>
> 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.
> See the one line you snipped from my message ;-)
All of the C compat tests have "exit (0)" at the end of main. It's the
tests in g++.dg/compat that don't specify a return value, which is true
of many of the other C++ tests.
Janis