]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[Patch, Darwin] Fix 81037 by adjutng headers
authorIain Sandoe <iain@codesourcery.com>
Mon, 25 Sep 2017 23:49:58 +0000 (23:49 +0000)
committerIain Sandoe <iains@gcc.gnu.org>
Mon, 25 Sep 2017 23:49:58 +0000 (23:49 +0000)
2017-09-26  Iain Sandoe  <iain@codesourcery.com>
            Ryan Mounce  <ryan@mounce.com.au>

PR bootstrap/81037
  Backport from mainline r235362
  2016-04-22  Szabolcs Nagy  <szabolcs.nagy@arm.com>

* 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  <szabolcs.nagy@arm.com>

* auto-profile.c: Remove <string.h> include.
* diagnostic.c: Remove <new> 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 <ryan@mounce.com.au>
From-SVN: r253181

16 files changed:
gcc/ChangeLog
gcc/auto-profile.c
gcc/c/c-objc-common.c
gcc/config/sh/sh.c
gcc/config/sh/sh_treg_combine.cc
gcc/cp/error.c
gcc/diagnostic.c
gcc/fortran/error.c
gcc/fortran/trans-common.c
gcc/genmatch.c
gcc/graphite-isl-ast-to-gimple.c
gcc/ipa-icf-gimple.c
gcc/ipa-icf.c
gcc/pretty-print.c
gcc/system.h
gcc/toplev.c

index 67f5b9f7b148bfaf824863b454c31fa3f0fbc999..fd4db26d578bed86e5ff714e0cb671451751b5b1 100644 (file)
@@ -1,3 +1,32 @@
+2017-09-26  Iain Sandoe  <iain@codesourcery.com>
+            Ryan Mounce  <ryan@mounce.com.au>
+
+       PR bootstrap/81037
+       Backport from mainline r235362
+       2016-04-22  Szabolcs Nagy  <szabolcs.nagy@arm.com>
+       * 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  <szabolcs.nagy@arm.com>
+
+       * auto-profile.c: Remove <string.h> include.
+       * diagnostic.c: Remove <new> 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  <amonakov@ispras.ru>
 
        PR tree-optimization/71702
index b8b02d174b4c66596d833bcc46f0724a6493561a..7bbd8140c45bda4a073d771938d6a0c96334f47a 100644 (file)
@@ -19,12 +19,10 @@ along with GCC; see the file COPYING3.  If not see
 <http://www.gnu.org/licenses/>.  */
 
 #include "config.h"
+#define INCLUDE_MAP
+#define INCLUDE_SET
 #include "system.h"
 
-#include <string.h>
-#include <map>
-#include <set>
-
 #include "coretypes.h"
 #include "hash-set.h"
 #include "machmode.h"
index 344d4e2949c86541aae74409bfbd24c74a58b8e6..c1ec601f93cd945b465e895e914763ce9de1b4c0 100644 (file)
@@ -38,8 +38,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "langhooks.h"
 #include "c-objc-common.h"
 
-#include <new>                          // For placement new.
-
 static bool c_tree_printer (pretty_printer *, text_info *, const char *,
                            int, bool, bool, bool);
 
index 3bb81fc1cd8c339281711559c3a9e29586a5bb49..9db77530c1f6c3624d04514e17bdb01939277ad4 100644 (file)
@@ -20,9 +20,9 @@ along with GCC; see the file COPYING3.  If not see
 <http://www.gnu.org/licenses/>.  */
 
 #include <sstream>
-#include <vector>
 
 #include "config.h"
+#define INCLUDE_VECTOR
 #include "system.h"
 #include "coretypes.h"
 #include "tm.h"
index e4f3581099c22669d45f6cd465160f0b9a06e733..ea20c3f407edf65c2b730eec02c94d4cd9ae4e97 100644 (file)
@@ -19,6 +19,9 @@ along with GCC; see the file COPYING3.  If not see
 <http://www.gnu.org/licenses/>.  */
 
 #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 <algorithm>
-#include <list>
-#include <vector>
-
 /*
 This pass tries to optimize for example this:
        mov.l   @(4,r4),r1
index 0c8bd66a325bbfcad179292da8c335bd5ae36683..f502127f34fb2c858adca72c31d27a754bed66b8 100644 (file)
@@ -44,8 +44,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "ubsan.h"
 #include "internal-fn.h"
 
-#include <new>                    // 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, ';')
 
index c43162269ec7bfe0187232cd9efd822491828dba..1c3815c9f3dc249996537d1f5f88b7b587e39912 100644 (file)
@@ -41,8 +41,6 @@ along with GCC; see the file COPYING3.  If not see
 # include <sys/ioctl.h>
 #endif
 
-#include <new>                     // 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)
index 18e127f8748fa1bd241e2c450160da7dd7d1ce58..2f76de50c9e7586b3b692a33be7cba44ffe29d35 100644 (file)
@@ -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 <new> /* For placement-new */
-
 static int suppress_errors = 0;
 
 static bool warnings_not_errors = false;
index f393419db5ef5f0d107600f540493bef3aa08afc..1ee744190d1ee7e5548bca69320994594083c8c4 100644 (file)
@@ -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 <map>
 #include "config.h"
+#define INCLUDE_MAP
 #include "system.h"
 #include "coretypes.h"
 #include "tm.h"
index 8f94ff09263ffe4c9238eabe58833a1f3106c420..8f495616e2e231650c8dd55a54dc148666d7545d 100644 (file)
@@ -22,7 +22,6 @@ along with GCC; see the file COPYING3.  If not see
 <http://www.gnu.org/licenses/>.  */
 
 #include "bconfig.h"
-#include <new>
 #include "system.h"
 #include "coretypes.h"
 #include "ggc.h"
index a83a85dbabc3aac391e90fd6c1edc22f8c9d565b..3216460b6256d954a7ef5887d8b99af462251946 100644 (file)
@@ -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 <map>
 
 #ifdef HAVE_isl
 #include "graphite-poly.h"
index a97f282a7a2fa861c63193b59e3fb0276b019de7..7dec3d41dece580597b91e7d1548bdf0805425c4 100644 (file)
@@ -20,6 +20,7 @@ along with GCC; see the file COPYING3.  If not see
 <http://www.gnu.org/licenses/>.  */
 
 #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 <list>
 #include "tree-ssanames.h"
 #include "tree-eh.h"
 #include "builtins.h"
index 216e4ed6da7432d130a543699d8e4194a7ae845b..7f86cca6e7f790a835fd60f37329b66891947c3b 100644 (file)
@@ -52,8 +52,8 @@ along with GCC; see the file COPYING3.  If not see
 */
 
 #include "config.h"
+#define INCLUDE_LIST
 #include "system.h"
-#include <list>
 #include "coretypes.h"
 #include "hash-set.h"
 #include "machmode.h"
index 78d334eae8875f1f88469b1e449fde43433ba58c..6881d1aeabe3958c961ce8c635101b0f6474eb3a 100644 (file)
@@ -25,8 +25,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "pretty-print.h"
 #include "diagnostic-color.h"
 
-#include <new>                    // For placement-new.
-
 #if HAVE_ICONV
 #include <iconv.h>
 #endif
index 94d8138c020b8816a25373d908b56a547c0216c2..3b753ad39519be104497125aab93c758f62b83aa 100644 (file)
@@ -215,6 +215,18 @@ extern int errno;
 #endif
 
 #ifdef __cplusplus
+# ifdef INCLUDE_LIST
+#  include <list>
+# endif
+# ifdef INCLUDE_MAP
+#  include <map>
+# endif
+# ifdef INCLUDE_SET
+#  include <set>
+# endif
+# ifdef INCLUDE_VECTOR
+#  include <vector>
+# endif
 # include <algorithm>
 # include <cstring>
 # include <utility>
index 17d051210267b3dee94fddde12f1cc7aad89bbe1..237e24ef34ee2c5bfe8bfaeff77257c89c823884 100644 (file)
@@ -135,8 +135,6 @@ along with GCC; see the file COPYING3.  If not see
 #define HAVE_prologue 0
 #endif
 
-#include <new>
-
 static void general_init (const char *, bool);
 static void do_compile ();
 static void process_options (void);