This patch by Andrew Wilkins fixes libgo to return 0 rather than NULL from main, which does, after all, return int. Bootstrapped on x86_64-unknown-linux-gnu. Committed to mainline.
Ian
Index: gcc/go/gofrontend/MERGE =================================================================== --- gcc/go/gofrontend/MERGE (revision 227665) +++ gcc/go/gofrontend/MERGE (working copy) @@ -1,4 +1,4 @@ -9bac6243d2252b2d043243d6ab1123ba7e90fa53 +352617bfe0a880febf5d2a87e89ea439c742ba18 The first line of this file holds the git revision number of the last merge done from the gofrontend repository. Index: libgo/runtime/go-main.c =================================================================== --- libgo/runtime/go-main.c (revision 227299) +++ libgo/runtime/go-main.c (working copy) @@ -38,7 +38,7 @@ main (int argc, char **argv) runtime_isarchive = false; if (runtime_isstarted) - return NULL; + return 0; runtime_isstarted = true; runtime_check ();