Re: Committed: fix gcc.dg/webizer.c (the trivial part :)

2012-10-21 Thread Hans-Peter Nilsson
On Sun, 21 Oct 2012, Andreas Schwab wrote:
> Hans-Peter Nilsson  writes:
>
> > I used __builtin_exit just to avoid declarations or includes;
>
> A "return 0" would have worked just as well.

It's not the preferred method.  Fail: abort().  Pass: exit(0).
Don't remember where I read it, though.

Brgds, H-P


Re: Committed: fix gcc.dg/webizer.c (the trivial part :)

2012-10-21 Thread Andreas Schwab
Hans-Peter Nilsson  writes:

> I used __builtin_exit just to avoid declarations or includes;

A "return 0" would have worked just as well.

Andreas.

-- 
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


Committed: fix gcc.dg/webizer.c (the trivial part :)

2012-10-21 Thread Hans-Peter Nilsson
Committed as obvious.  Without this, mmix-knuth-mmixware exited with
2256, likely a return-address left over in the return-value-register.
I used __builtin_exit just to avoid declarations or includes; the
default implicit declaration apparently incompatible with this use.
I saw nothing in the related conversation thread that this was
anything but an oversight.  Of course this might have caused an
unintended failure mistaken for a valid test-case, but Occam says
that's overthinking.

testsuite:
* gcc.dg/webizer.c (main): Add missing exit call.

Index: gcc.dg/webizer.c
===
--- gcc.dg/webizer.c(revision 192651)
+++ gcc.dg/webizer.c(working copy)
@@ -32,4 +32,5 @@ configure2()
 main()
 {
   configure2();
+  __builtin_exit (0);
 }

brgds, H-P