This patch to the Go frontend increases the size of a local buffer to avoid a -Wformat-length warning. This undoes a patch that was earlier committed to the GCC repository in favor of a patch to the gofrontend repository mirrored to GCC. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline.
Ian
Index: gcc/go/ChangeLog =================================================================== --- gcc/go/ChangeLog (revision 240053) +++ gcc/go/ChangeLog (working copy) @@ -4,12 +4,6 @@ * Make-lang.in (GO_OBJS): Add go/go-sha1.o. (CFLAGS-go/go-sha1.o): New variable. -2016-09-01 Martin Sebor <mse...@redhat.com> - - * gofrontend/expressions.cc: Increase buffer size to guarantee - it fits the output of the formatted function regardless of its - arguments. - 2016-08-29 Ian Lance Taylor <i...@google.com> * lang.opt (fgo-c-header, fgo-compiling-runtime): New options. Index: gcc/go/gofrontend/MERGE =================================================================== --- gcc/go/gofrontend/MERGE (revision 240053) +++ gcc/go/gofrontend/MERGE (working copy) @@ -1,4 +1,4 @@ -2022ddc85f812b6990b72c7e95b8207e07ac8984 +c2bd848dce774e8009ae1d8ee5d91ddc601ce37f The first line of this file holds the git revision number of the last merge done from the gofrontend repository. Index: gcc/go/gofrontend/expressions.cc =================================================================== --- gcc/go/gofrontend/expressions.cc (revision 240053) +++ gcc/go/gofrontend/expressions.cc (working copy) @@ -9050,8 +9050,7 @@ Call_expression::do_flatten(Gogo* gogo, Location loc = this->location(); int i = 0; - /* Buffer large enough for INT_MAX plus the prefix. */ - char buf[14]; + char buf[20]; for (Typed_identifier_list::const_iterator p = results->begin(); p != results->end(); ++p, ++i)