From: Iain Sandoe Date: Mon, 25 Sep 2017 23:49:58 +0000 (+0000) Subject: [Patch, Darwin] Fix 81037 by adjutng headers X-Git-Tag: releases/gcc-5.5.0~19 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d30443c7b7bbf2be090fbc6d015a6451a01c4df6;p=thirdparty%2Fgcc.git [Patch, Darwin] Fix 81037 by adjutng headers 2017-09-26 Iain Sandoe Ryan Mounce PR bootstrap/81037 Backport from mainline r235362 2016-04-22 Szabolcs Nagy * system.h (list, map, set, vector): Include conditionally. * auto-profile.c (INCLUDE_MAP, INCLUDE_SET): Define. * graphite-isl-ast-to-gimple.c (INCLUDE_MAP): Define. * ipa-icf.c (INCLUDE_LIST): Define. * ipa-icf-gimple.c (INCLUDE_LIST): Define. * config/sh/sh.c (INCLUDE_VECTOR): Define. * config/sh/sh_treg_combine.cc (INCLUDE_ALGORITHM): Define. (INCLUDE_LIST, INCLUDE_VECTOR): Define. * fortran/trans-common.c (INCLUDE_MAP): Define. Backport from mainline r235361 2016-04-22 Szabolcs Nagy * auto-profile.c: Remove include. * diagnostic.c: Remove include. * genmatch.c: Likewise. * pretty-print.c: Likewise. * toplev.c: Likewise * c/c-objc-common.c: Likewise. * cp/error.c: Likewise. * fortran/error.c: Likewise. Co-Authored-By: Ryan Mounce From-SVN: r253181 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 67f5b9f7b148..fd4db26d578b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,32 @@ +2017-09-26 Iain Sandoe + Ryan Mounce + + PR bootstrap/81037 + Backport from mainline r235362 + 2016-04-22 Szabolcs Nagy + + * system.h (list, map, set, vector): Include conditionally. + * auto-profile.c (INCLUDE_MAP, INCLUDE_SET): Define. + * graphite-isl-ast-to-gimple.c (INCLUDE_MAP): Define. + * ipa-icf.c (INCLUDE_LIST): Define. + * ipa-icf-gimple.c (INCLUDE_LIST): Define. + * config/sh/sh.c (INCLUDE_VECTOR): Define. + * config/sh/sh_treg_combine.cc (INCLUDE_ALGORITHM): Define. + (INCLUDE_LIST, INCLUDE_VECTOR): Define. + * fortran/trans-common.c (INCLUDE_MAP): Define. + + Backport from mainline r235361 + 2016-04-22 Szabolcs Nagy + + * auto-profile.c: Remove include. + * diagnostic.c: Remove include. + * genmatch.c: Likewise. + * pretty-print.c: Likewise. + * toplev.c: Likewise + * c/c-objc-common.c: Likewise. + * cp/error.c: Likewise. + * fortran/error.c: Likewise. + 2017-09-22 Alexander Monakov PR tree-optimization/71702 diff --git a/gcc/auto-profile.c b/gcc/auto-profile.c index b8b02d174b4c..7bbd8140c45b 100644 --- a/gcc/auto-profile.c +++ b/gcc/auto-profile.c @@ -19,12 +19,10 @@ along with GCC; see the file COPYING3. If not see . */ #include "config.h" +#define INCLUDE_MAP +#define INCLUDE_SET #include "system.h" -#include -#include -#include - #include "coretypes.h" #include "hash-set.h" #include "machmode.h" diff --git a/gcc/c/c-objc-common.c b/gcc/c/c-objc-common.c index 344d4e2949c8..c1ec601f93cd 100644 --- a/gcc/c/c-objc-common.c +++ b/gcc/c/c-objc-common.c @@ -38,8 +38,6 @@ along with GCC; see the file COPYING3. If not see #include "langhooks.h" #include "c-objc-common.h" -#include // For placement new. - static bool c_tree_printer (pretty_printer *, text_info *, const char *, int, bool, bool, bool); diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c index 3bb81fc1cd8c..9db77530c1f6 100644 --- a/gcc/config/sh/sh.c +++ b/gcc/config/sh/sh.c @@ -20,9 +20,9 @@ along with GCC; see the file COPYING3. If not see . */ #include -#include #include "config.h" +#define INCLUDE_VECTOR #include "system.h" #include "coretypes.h" #include "tm.h" diff --git a/gcc/config/sh/sh_treg_combine.cc b/gcc/config/sh/sh_treg_combine.cc index e4f3581099c2..ea20c3f407ed 100644 --- a/gcc/config/sh/sh_treg_combine.cc +++ b/gcc/config/sh/sh_treg_combine.cc @@ -19,6 +19,9 @@ along with GCC; see the file COPYING3. If not see . */ #include "config.h" +#define INCLUDE_ALGORITHM +#define INCLUDE_LIST +#define INCLUDE_VECTOR #include "system.h" #include "coretypes.h" #include "machmode.h" @@ -65,10 +68,6 @@ along with GCC; see the file COPYING3. If not see #include "stmt.h" #include "expr.h" -#include -#include -#include - /* This pass tries to optimize for example this: mov.l @(4,r4),r1 diff --git a/gcc/cp/error.c b/gcc/cp/error.c index 0c8bd66a325b..f502127f34fb 100644 --- a/gcc/cp/error.c +++ b/gcc/cp/error.c @@ -44,8 +44,6 @@ along with GCC; see the file COPYING3. If not see #include "ubsan.h" #include "internal-fn.h" -#include // For placement-new. - #define pp_separate_with_comma(PP) pp_cxx_separate_with (PP, ',') #define pp_separate_with_semicolon(PP) pp_cxx_separate_with (PP, ';') diff --git a/gcc/diagnostic.c b/gcc/diagnostic.c index c43162269ec7..1c3815c9f3dc 100644 --- a/gcc/diagnostic.c +++ b/gcc/diagnostic.c @@ -41,8 +41,6 @@ along with GCC; see the file COPYING3. If not see # include #endif -#include // For placement new. - #define pedantic_warning_kind(DC) \ ((DC)->pedantic_errors ? DK_ERROR : DK_WARNING) #define permissive_error_kind(DC) ((DC)->permissive ? DK_WARNING : DK_ERROR) diff --git a/gcc/fortran/error.c b/gcc/fortran/error.c index 18e127f8748f..2f76de50c9e7 100644 --- a/gcc/fortran/error.c +++ b/gcc/fortran/error.c @@ -34,8 +34,6 @@ along with GCC; see the file COPYING3. If not see #include "diagnostic-color.h" #include "tree-diagnostic.h" /* tree_diagnostics_defaults */ -#include /* For placement-new */ - static int suppress_errors = 0; static bool warnings_not_errors = false; diff --git a/gcc/fortran/trans-common.c b/gcc/fortran/trans-common.c index f393419db5ef..1ee744190d1e 100644 --- a/gcc/fortran/trans-common.c +++ b/gcc/fortran/trans-common.c @@ -92,8 +92,8 @@ along with GCC; see the file COPYING3. If not see is examined for still-unused equivalence conditions. We create a block for each merged equivalence list. */ -#include #include "config.h" +#define INCLUDE_MAP #include "system.h" #include "coretypes.h" #include "tm.h" diff --git a/gcc/genmatch.c b/gcc/genmatch.c index 8f94ff09263f..8f495616e2e2 100644 --- a/gcc/genmatch.c +++ b/gcc/genmatch.c @@ -22,7 +22,6 @@ along with GCC; see the file COPYING3. If not see . */ #include "bconfig.h" -#include #include "system.h" #include "coretypes.h" #include "ggc.h" diff --git a/gcc/graphite-isl-ast-to-gimple.c b/gcc/graphite-isl-ast-to-gimple.c index a83a85dbabc3..3216460b6256 100644 --- a/gcc/graphite-isl-ast-to-gimple.c +++ b/gcc/graphite-isl-ast-to-gimple.c @@ -38,6 +38,7 @@ extern "C" { #endif #endif +#define INCLUDE_MAP #include "system.h" #include "coretypes.h" #include "hash-set.h" @@ -75,7 +76,6 @@ extern "C" { #include "tree-scalar-evolution.h" #include "gimple-ssa.h" #include "tree-into-ssa.h" -#include #ifdef HAVE_isl #include "graphite-poly.h" diff --git a/gcc/ipa-icf-gimple.c b/gcc/ipa-icf-gimple.c index a97f282a7a2f..7dec3d41dece 100644 --- a/gcc/ipa-icf-gimple.c +++ b/gcc/ipa-icf-gimple.c @@ -20,6 +20,7 @@ along with GCC; see the file COPYING3. If not see . */ #include "config.h" +#define INCLUDE_LIST #include "system.h" #include "coretypes.h" #include "hash-set.h" @@ -74,7 +75,6 @@ along with GCC; see the file COPYING3. If not see #include "cgraph.h" #include "data-streamer.h" #include "ipa-utils.h" -#include #include "tree-ssanames.h" #include "tree-eh.h" #include "builtins.h" diff --git a/gcc/ipa-icf.c b/gcc/ipa-icf.c index 216e4ed6da74..7f86cca6e7f7 100644 --- a/gcc/ipa-icf.c +++ b/gcc/ipa-icf.c @@ -52,8 +52,8 @@ along with GCC; see the file COPYING3. If not see */ #include "config.h" +#define INCLUDE_LIST #include "system.h" -#include #include "coretypes.h" #include "hash-set.h" #include "machmode.h" diff --git a/gcc/pretty-print.c b/gcc/pretty-print.c index 78d334eae887..6881d1aeabe3 100644 --- a/gcc/pretty-print.c +++ b/gcc/pretty-print.c @@ -25,8 +25,6 @@ along with GCC; see the file COPYING3. If not see #include "pretty-print.h" #include "diagnostic-color.h" -#include // For placement-new. - #if HAVE_ICONV #include #endif diff --git a/gcc/system.h b/gcc/system.h index 94d8138c020b..3b753ad39519 100644 --- a/gcc/system.h +++ b/gcc/system.h @@ -215,6 +215,18 @@ extern int errno; #endif #ifdef __cplusplus +# ifdef INCLUDE_LIST +# include +# endif +# ifdef INCLUDE_MAP +# include +# endif +# ifdef INCLUDE_SET +# include +# endif +# ifdef INCLUDE_VECTOR +# include +# endif # include # include # include diff --git a/gcc/toplev.c b/gcc/toplev.c index 17d051210267..237e24ef34ee 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -135,8 +135,6 @@ along with GCC; see the file COPYING3. If not see #define HAVE_prologue 0 #endif -#include - static void general_init (const char *, bool); static void do_compile (); static void process_options (void);