system.h (string, algorithm): Include only conditionally.
* system.h (string, algorithm): Include only conditionally. (new): Include always under C++. * bb-reorder.c (toplevel): Define INCLUDE_ALGORITHM. * final.c (toplevel): Ditto. * ipa-chkp.c (toplevel): Define INCLUDE_STRING. * genconditions.c (write_header): Make gencondmd.c define INCLUDE_STRING. * mem-stats.h (mem_usage::print_dash_line): Don't use std::string. * config/aarch64/aarch64.c (toplevel): Define INCLUDE_STRING. * common/config/aarch64/aarch64-common.c (toplevel): Ditto. From-SVN: r232736
This commit is contained in:
parent
6041f70ae3
commit
017360184d
|
@ -1,3 +1,17 @@
|
|||
2016-01-22 Michael Matz <matz@suse.de>
|
||||
|
||||
* system.h (string, algorithm): Include only conditionally.
|
||||
(new): Include always under C++.
|
||||
* bb-reorder.c (toplevel): Define INCLUDE_ALGORITHM.
|
||||
* final.c (toplevel): Ditto.
|
||||
* ipa-chkp.c (toplevel): Define INCLUDE_STRING.
|
||||
* genconditions.c (write_header): Make gencondmd.c define
|
||||
INCLUDE_STRING.
|
||||
* mem-stats.h (mem_usage::print_dash_line): Don't use std::string.
|
||||
|
||||
* config/aarch64/aarch64.c (toplevel): Define INCLUDE_STRING.
|
||||
* common/config/aarch64/aarch64-common.c (toplevel): Ditto.
|
||||
|
||||
2016-01-22 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
|
||||
|
||||
* gcc.target/powerpc/pr63354.c: Restrict to Linux targets with
|
||||
|
|
|
@ -91,6 +91,7 @@
|
|||
*/
|
||||
|
||||
#include "config.h"
|
||||
#define INCLUDE_ALGORITHM /* stable_sort */
|
||||
#include "system.h"
|
||||
#include "coretypes.h"
|
||||
#include "backend.h"
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
<http://www.gnu.org/licenses/>. */
|
||||
|
||||
#include "config.h"
|
||||
#define INCLUDE_STRING
|
||||
#include "system.h"
|
||||
#include "coretypes.h"
|
||||
#include "tm.h"
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
<http://www.gnu.org/licenses/>. */
|
||||
|
||||
#include "config.h"
|
||||
#define INCLUDE_STRING
|
||||
#include "system.h"
|
||||
#include "coretypes.h"
|
||||
#include "backend.h"
|
||||
|
|
|
@ -43,6 +43,7 @@ along with GCC; see the file COPYING3. If not see
|
|||
function_epilogue. Those instructions never exist as rtl. */
|
||||
|
||||
#include "config.h"
|
||||
#define INCLUDE_ALGORITHM /* reverse */
|
||||
#include "system.h"
|
||||
#include "coretypes.h"
|
||||
#include "backend.h"
|
||||
|
|
|
@ -51,6 +51,7 @@ write_header (void)
|
|||
machine description file. */\n\
|
||||
\n\
|
||||
#include \"bconfig.h\"\n\
|
||||
#define INCLUDE_STRING\n\
|
||||
#include \"system.h\"\n\
|
||||
\n\
|
||||
/* It is necessary, but not entirely safe, to include the headers below\n\
|
||||
|
|
|
@ -19,6 +19,7 @@ along with GCC; see the file COPYING3. If not see
|
|||
<http://www.gnu.org/licenses/>. */
|
||||
|
||||
#include "config.h"
|
||||
#define INCLUDE_STRING
|
||||
#include "system.h"
|
||||
#include "coretypes.h"
|
||||
#include "backend.h"
|
||||
|
|
|
@ -200,7 +200,9 @@ struct mem_usage
|
|||
static inline void
|
||||
print_dash_line (size_t count = 140)
|
||||
{
|
||||
fprintf (stderr, "%s\n", std::string (count, '-').c_str ());
|
||||
while (count--)
|
||||
fputc ('-', stderr);
|
||||
fputc ('\n', stderr);
|
||||
}
|
||||
|
||||
/* Dump header with NAME. */
|
||||
|
|
|
@ -198,8 +198,10 @@ extern int fprintf_unlocked (FILE *, const char *, ...);
|
|||
the ctype macros through safe-ctype.h */
|
||||
|
||||
#ifdef __cplusplus
|
||||
#ifdef INCLUDE_STRING
|
||||
# include <string>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* There are an extraordinary number of issues with <ctype.h>.
|
||||
The last straw is that it varies with the locale. Use libiberty's
|
||||
|
@ -215,8 +217,11 @@ extern int errno;
|
|||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#ifdef INCLUDE_ALGORITHM
|
||||
# include <algorithm>
|
||||
#endif
|
||||
# include <cstring>
|
||||
# include <new>
|
||||
# include <utility>
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in New Issue