aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorFrancois-Xavier Coudert <fxcoudert@gcc.gnu.org>2014-11-11 09:20:07 +0000
committerFrançois-Xavier Coudert <fxcoudert@gcc.gnu.org>2014-11-11 09:20:07 +0000
commit33c430b50424ec31c83603616fc94671fc7ffac2 (patch)
tree24bb32afacf6702b2c625a2a53eac39fadac1484 /gcc
parent04dc44ac2176a137c38eff59138df59b230e6ee1 (diff)
downloadgcc-33c430b50424ec31c83603616fc94671fc7ffac2.zip
gcc-33c430b50424ec31c83603616fc94671fc7ffac2.tar.gz
gcc-33c430b50424ec31c83603616fc94671fc7ffac2.tar.bz2
re PR bootstrap/63699 (Bootstrap fails in libcc1 on darwin14)
PR bootstrap/63699 PR bootstrap/63750 * system.h: Include <string> before "safe-ctype.h" * wide-int.h (wi::smin, wi::smax, wi::umin, wi::umax): Prefix calls to min/max with wi namespace. * ipa-chkp.c: Don't include <string>. * plugin.cc: Don't include <string>. From-SVN: r217342
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog9
-rw-r--r--gcc/ipa-chkp.c1
-rw-r--r--gcc/system.h7
-rw-r--r--gcc/wide-int.h8
4 files changed, 20 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index b19ce48..f86c51b 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,12 @@
+2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
+
+ PR bootstrap/63699
+ PR bootstrap/63750
+ * system.h: Include <string> before "safe-ctype.h"
+ * wide-int.h (wi::smin, wi::smax, wi::umin, wi::umax): Prefix
+ calls to min/max with wi namespace.
+ * ipa-chkp.c: Don't include <string>.
+
2014-11-11 Terry Guo <terry.guo@arm.com>
* doc/invoke.texi (-masm-syntax-unified): Reword and fix typo.
diff --git a/gcc/ipa-chkp.c b/gcc/ipa-chkp.c
index f910583..19a9894 100644
--- a/gcc/ipa-chkp.c
+++ b/gcc/ipa-chkp.c
@@ -41,7 +41,6 @@ along with GCC; see the file COPYING3. If not see
#include "cgraph.h"
#include "tree-chkp.h"
#include "ipa-chkp.h"
-#include <string>
/* Pointer Bounds Checker has two IPA passes to support code instrumentation.
diff --git a/gcc/system.h b/gcc/system.h
index 74ddfe9..c05f02d 100644
--- a/gcc/system.h
+++ b/gcc/system.h
@@ -194,6 +194,13 @@ extern int fprintf_unlocked (FILE *, const char *, ...);
#undef fread_unlocked
#undef fwrite_unlocked
+/* Include <string> before "safe-ctype.h" to avoid GCC poisoning
+ the ctype macros through safe-ctype.h */
+
+#ifdef __cplusplus
+# include <string>
+#endif
+
/* There are an extraordinary number of issues with <ctype.h>.
The last straw is that it varies with the locale. Use libiberty's
replacement instead. */
diff --git a/gcc/wide-int.h b/gcc/wide-int.h
index 2cbcbd2..00c7d6e 100644
--- a/gcc/wide-int.h
+++ b/gcc/wide-int.h
@@ -2129,7 +2129,7 @@ template <typename T1, typename T2>
inline WI_BINARY_RESULT (T1, T2)
wi::smin (const T1 &x, const T2 &y)
{
- return min (x, y, SIGNED);
+ return wi::min (x, y, SIGNED);
}
/* Return the minimum of X and Y, treating both as unsigned values. */
@@ -2137,7 +2137,7 @@ template <typename T1, typename T2>
inline WI_BINARY_RESULT (T1, T2)
wi::umin (const T1 &x, const T2 &y)
{
- return min (x, y, UNSIGNED);
+ return wi::min (x, y, UNSIGNED);
}
/* Return the maxinum of X and Y, treating them both as having
@@ -2160,7 +2160,7 @@ template <typename T1, typename T2>
inline WI_BINARY_RESULT (T1, T2)
wi::smax (const T1 &x, const T2 &y)
{
- return max (x, y, SIGNED);
+ return wi::max (x, y, SIGNED);
}
/* Return the maximum of X and Y, treating both as unsigned values. */
@@ -2168,7 +2168,7 @@ template <typename T1, typename T2>
inline WI_BINARY_RESULT (T1, T2)
wi::umax (const T1 &x, const T2 &y)
{
- return max (x, y, UNSIGNED);
+ return wi::max (x, y, UNSIGNED);
}
/* Return X & Y. */