On Fri, Jan 22, 2016 at 09:23:48PM +0100, Jakub Jelinek wrote: > On Fri, Jan 22, 2016 at 12:09:43PM -0800, H.J. Lu wrote: > > > * system.h (string, algorithm): Include only conditionally. > > > (new): Include always under C++. > > > * bb-reorder.c (toplevel): Define USES_ALGORITHM. > > > * final.c (toplevel): Ditto. > > > * ipa-chkp.c (toplevel): Define USES_STRING. > > > * genconditions.c (write_header): Make gencondmd.c define > > > USES_STRING. > > > * mem-stats.h (mem_usage::print_dash_line): Don't use std::string. > > > > > > > This may have caused: > > > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69434 > > Guess we need: > > 2016-01-22 Jakub Jelinek <ja...@redhat.com> > > PR bootstrap/69434 > * genrecog.c: Define INCLUDE_ALGORITHM before including system.h, > remove <algorithm> include.
Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? > --- gcc/genrecog.c.jj 2016-01-04 18:50:33.207491883 +0100 > +++ gcc/genrecog.c 2016-01-22 21:21:42.852362294 +0100 > @@ -105,6 +105,7 @@ > 5. Write out C++ code for each function. */ > > #include "bconfig.h" > +#define INCLUDE_ALGORITHM > #include "system.h" > #include "coretypes.h" > #include "tm.h" > @@ -112,7 +113,6 @@ > #include "errors.h" > #include "read-md.h" > #include "gensupport.h" > -#include <algorithm> > > #undef GENERATOR_FILE > enum true_rtx_doe { Jakub