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
This commit is contained in:
Francois-Xavier Coudert 2014-11-11 09:20:07 +00:00 committed by François-Xavier Coudert
parent 04dc44ac21
commit 33c430b504
6 changed files with 26 additions and 7 deletions

View File

@ -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.

View File

@ -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.

View File

@ -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. */

View File

@ -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. */

View File

@ -1,3 +1,9 @@
2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
PR bootstrap/63699
PR bootstrap/63750
* plugin.cc: Don't include <string>.
2014-10-29 Jakub Jelinek <jakub@redhat.com>
Phil Muldoon <pmuldoon@redhat.com>

View File

@ -55,8 +55,6 @@
#include "connection.hh"
#include "rpc.hh"
#include <string>
#ifdef __GNUC__
#pragma GCC visibility push(default)
#endif