Message ID | yddoa58ve6m.fsf@CeBiTec.Uni-Bielefeld.DE |
---|---|
State | New |
Headers | show |
On Thu, Aug 4, 2016 at 6:47 AM, Rainer Orth <ro@cebitec.uni-bielefeld.de> wrote: > >> This patch by Chris Manghane adds debugging to the escape analysis >> code. This debugging is designed to generate the same sort of output >> as the gc Go compiler, for easier comparison of results. Escape >> analysis is still not enabled by default. Bootstrapped and ran Go >> testsuite on x86_64-pc-linux-gnu. Committed to mainline. > > this patch (resp. this particular line) > >> Index: gcc/go/gofrontend/escape.cc >> =================================================================== >> --- gcc/go/gofrontend/escape.cc (revision 238653) >> +++ gcc/go/gofrontend/escape.cc (working copy) >> @@ -6,12 +6,14 @@ >> >> #include <limits> >> #include <stack> >> +#include <sstream> > > broke Solaris bootstrap: > > from /vol/gcc/src/hg/trunk/local/gcc/go/go-system.h:23, > from /vol/gcc/src/hg/trunk/local/gcc/go/gofrontend/go-linemap.h:10, > from /vol/gcc/src/hg/trunk/local/gcc/go/gofrontend/gogo.h:10, > from /vol/gcc/src/hg/trunk/local/gcc/go/gofrontend/escape.cc:11: > ./auto-host.h:2214:0: error: "_FILE_OFFSET_BITS" redefined [-Werror] > #define _FILE_OFFSET_BITS 64 > > In file included from /var/gcc/regression/trunk/12-gcc-gas/build/prev-gcc/include-fixed/wchar.h:17:0, > from /var/gcc/regression/trunk/12-gcc-gas/build/prev-i386-pc-solaris2.12/libstdc++-v3/include/cwchar:44, > from /var/gcc/regression/trunk/12-gcc-gas/build/prev-i386-pc-solaris2.12/libstdc++-v3/include/bits/postypes.h:40, > from /var/gcc/regression/trunk/12-gcc-gas/build/prev-i386-pc-solaris2.12/libstdc++-v3/include/iosfwd:40, > from /var/gcc/regression/trunk/12-gcc-gas/build/prev-i386-pc-solaris2.12/libstdc++-v3/include/ios:38, > from /var/gcc/regression/trunk/12-gcc-gas/build/prev-i386-pc-solaris2.12/libstdc++-v3/include/istream:38, > from /var/gcc/regression/trunk/12-gcc-gas/build/prev-i386-pc-solaris2.12/libstdc++-v3/include/sstream:38, > from /vol/gcc/src/hg/trunk/local/gcc/go/gofrontend/escape.cc:9: > /var/gcc/regression/trunk/12-gcc-gas/build/prev-gcc/include-fixed/sys/feature_tests.h:223:0: note: this is the location of the previous definition > #define _FILE_OFFSET_BITS 32 > > Including anything before "config.h" (or in the case of Go "go-system.h") > is fragile at best. > > The following patch allowed me to compile escape.cc again. Thanks. Committed. Ian
diff --git a/gcc/go/gofrontend/escape.cc b/gcc/go/gofrontend/escape.cc --- a/gcc/go/gofrontend/escape.cc +++ b/gcc/go/gofrontend/escape.cc @@ -4,6 +4,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +#include "go-system.h" + #include <limits> #include <stack> #include <sstream>