diff --git a/gcc/ada/gcc-interface/misc.cc b/gcc/ada/gcc-interface/misc.cc index 2aa1bfd410b..8c921db7dcd 100644 --- a/gcc/ada/gcc-interface/misc.cc +++ b/gcc/ada/gcc-interface/misc.cc @@ -23,6 +23,7 @@ * * ****************************************************************************/ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/ada/gcc-interface/trans.cc b/gcc/ada/gcc-interface/trans.cc index a073b2d94f1..5f5cbe5b477 100644 --- a/gcc/ada/gcc-interface/trans.cc +++ b/gcc/ada/gcc-interface/trans.cc @@ -23,6 +23,7 @@ * * ****************************************************************************/ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/ada/gcc-interface/utils.cc b/gcc/ada/gcc-interface/utils.cc index a88a23860d3..951d3848d09 100644 --- a/gcc/ada/gcc-interface/utils.cc +++ b/gcc/ada/gcc-interface/utils.cc @@ -23,6 +23,7 @@ * * ****************************************************************************/ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/analyzer/analyzer-logging.cc b/gcc/analyzer/analyzer-logging.cc index d3b04f2d9b1..2a4d02f83ba 100644 --- a/gcc/analyzer/analyzer-logging.cc +++ b/gcc/analyzer/analyzer-logging.cc @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" @@ -50,12 +51,12 @@ logger::logger (FILE *f_out, m_log_refcount_changes (false), m_pp (reference_pp.clone ()) { - pp_show_color (m_pp) = 0; - pp_buffer (m_pp)->m_stream = f_out; + pp_show_color (m_pp.get ()) = 0; + pp_buffer (m_pp.get ())->m_stream = f_out; /* %qE in logs for SSA_NAMEs should show the ssa names, rather than trying to prettify things by showing the underlying var. */ - pp_format_decoder (m_pp) = default_tree_printer; + pp_format_decoder (m_pp.get ()) = default_tree_printer; /* Begin the log by writing the GCC version. */ print_version (f_out, "", false); @@ -70,7 +71,6 @@ logger::~logger () /* This should be the last message emitted. */ log ("%s", __PRETTY_FUNCTION__); gcc_assert (m_refcount == 0); - delete m_pp; } /* Increment the reference count of the logger. */ @@ -145,15 +145,15 @@ void logger::log_va_partial (const char *fmt, va_list *ap) { text_info text (fmt, ap, 0); - pp_format (m_pp, &text); - pp_output_formatted_text (m_pp); + pp_format (m_pp.get (), &text); + pp_output_formatted_text (m_pp.get ()); } void logger::end_log_line () { - pp_flush (m_pp); - pp_clear_output_area (m_pp); + pp_flush (m_pp.get ()); + pp_clear_output_area (m_pp.get ()); fprintf (m_f_out, "\n"); fflush (m_f_out); } diff --git a/gcc/analyzer/analyzer-logging.h b/gcc/analyzer/analyzer-logging.h index eb2cde7a306..aaa3d79a30e 100644 --- a/gcc/analyzer/analyzer-logging.h +++ b/gcc/analyzer/analyzer-logging.h @@ -57,7 +57,7 @@ class logger void inc_indent () { m_indent_level++; } void dec_indent () { m_indent_level--; } - pretty_printer *get_printer () const { return m_pp; } + pretty_printer *get_printer () const { return m_pp.get (); } FILE *get_file () const { return m_f_out; } private: @@ -67,7 +67,7 @@ private: FILE *m_f_out; int m_indent_level; bool m_log_refcount_changes; - pretty_printer *m_pp; + std::unique_ptr m_pp; }; /* The class log_scope is an RAII-style class intended to make diff --git a/gcc/analyzer/analyzer.cc b/gcc/analyzer/analyzer.cc index 4a1a3615713..0f998e3f66f 100644 --- a/gcc/analyzer/analyzer.cc +++ b/gcc/analyzer/analyzer.cc @@ -494,11 +494,11 @@ get_user_facing_name (const gcall *call) label_text make_label_text (bool can_colorize, const char *fmt, ...) { - pretty_printer *pp = global_dc->m_printer->clone (); - pp_clear_output_area (pp); + std::unique_ptr pp (global_dc->clone_printer ()); + pp_clear_output_area (pp.get ()); if (!can_colorize) - pp_show_color (pp) = false; + pp_show_color (pp.get ()) = false; rich_location rich_loc (line_table, UNKNOWN_LOCATION); @@ -507,13 +507,12 @@ make_label_text (bool can_colorize, const char *fmt, ...) va_start (ap, fmt); text_info ti (_(fmt), &ap, 0, NULL, &rich_loc); - pp_format (pp, &ti); - pp_output_formatted_text (pp); + pp_format (pp.get (), &ti); + pp_output_formatted_text (pp.get ()); va_end (ap); - label_text result = label_text::take (xstrdup (pp_formatted_text (pp))); - delete pp; + label_text result = label_text::take (xstrdup (pp_formatted_text (pp.get ()))); return result; } @@ -524,11 +523,11 @@ make_label_text_n (bool can_colorize, unsigned HOST_WIDE_INT n, const char *singular_fmt, const char *plural_fmt, ...) { - pretty_printer *pp = global_dc->m_printer->clone (); - pp_clear_output_area (pp); + std::unique_ptr pp (global_dc->clone_printer ()); + pp_clear_output_area (pp.get ()); if (!can_colorize) - pp_show_color (pp) = false; + pp_show_color (pp.get ()) = false; rich_location rich_loc (line_table, UNKNOWN_LOCATION); @@ -540,13 +539,13 @@ make_label_text_n (bool can_colorize, unsigned HOST_WIDE_INT n, text_info ti (fmt, &ap, 0, NULL, &rich_loc); - pp_format (pp, &ti); - pp_output_formatted_text (pp); + pp_format (pp.get (), &ti); + pp_output_formatted_text (pp.get ()); va_end (ap); - label_text result = label_text::take (xstrdup (pp_formatted_text (pp))); - delete pp; + label_text result + = label_text::take (xstrdup (pp_formatted_text (pp.get ()))); return result; } diff --git a/gcc/analyzer/bar-chart.cc b/gcc/analyzer/bar-chart.cc index 4a4acf5f377..3a259f80066 100644 --- a/gcc/analyzer/bar-chart.cc +++ b/gcc/analyzer/bar-chart.cc @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/analyzer/pending-diagnostic.cc b/gcc/analyzer/pending-diagnostic.cc index ec6f5acf21f..a900839375c 100644 --- a/gcc/analyzer/pending-diagnostic.cc +++ b/gcc/analyzer/pending-diagnostic.cc @@ -93,21 +93,19 @@ interesting_t::dump_to_pp (pretty_printer *pp, bool simple) const label_text evdesc::event_desc::formatted_print (const char *fmt, ...) const { - pretty_printer *pp = global_dc->m_printer->clone (); + auto pp = global_dc->clone_printer (); - pp_show_color (pp) = m_colorize; + pp_show_color (pp.get ()) = m_colorize; rich_location rich_loc (line_table, UNKNOWN_LOCATION); va_list ap; va_start (ap, fmt); text_info ti (_(fmt), &ap, 0, nullptr, &rich_loc); - pp_format (pp, &ti); - pp_output_formatted_text (pp); + pp_format (pp.get (), &ti); + pp_output_formatted_text (pp.get ()); va_end (ap); - label_text result = label_text::take (xstrdup (pp_formatted_text (pp))); - delete pp; - return result; + return label_text::take (xstrdup (pp_formatted_text (pp.get ()))); } /* class diagnostic_emission_context. */ diff --git a/gcc/analyzer/sm-malloc.cc b/gcc/analyzer/sm-malloc.cc index 11c0e1b1a2f..12465cbe42b 100644 --- a/gcc/analyzer/sm-malloc.cc +++ b/gcc/analyzer/sm-malloc.cc @@ -1648,14 +1648,13 @@ private: static bool sufficiently_similar_p (tree expr_a, tree expr_b) { - pretty_printer *pp_a = global_dc->m_printer->clone (); - pretty_printer *pp_b = global_dc->m_printer->clone (); - pp_printf (pp_a, "%qE", expr_a); - pp_printf (pp_b, "%qE", expr_b); - bool result = (strcmp (pp_formatted_text (pp_a), pp_formatted_text (pp_b)) + auto pp_a = global_dc->clone_printer (); + auto pp_b = global_dc->clone_printer (); + pp_printf (pp_a.get (), "%qE", expr_a); + pp_printf (pp_b.get (), "%qE", expr_b); + bool result = (strcmp (pp_formatted_text (pp_a.get ()), + pp_formatted_text (pp_b.get ())) == 0); - delete pp_a; - delete pp_b; return result; } diff --git a/gcc/analyzer/supergraph.cc b/gcc/analyzer/supergraph.cc index 55bd42a89a1..826f8f614f7 100644 --- a/gcc/analyzer/supergraph.cc +++ b/gcc/analyzer/supergraph.cc @@ -437,16 +437,15 @@ supergraph::dump_dot_to_pp (pretty_printer *pp, void supergraph::dump_dot_to_file (FILE *fp, const dump_args_t &dump_args) const { - pretty_printer *pp = global_dc->m_printer->clone (); - pp_show_color (pp) = 0; + std::unique_ptr pp (global_dc->clone_printer ()); + pp_show_color (pp.get ()) = 0; /* %qE in logs for SSA_NAMEs should show the ssa names, rather than trying to prettify things by showing the underlying var. */ - pp_format_decoder (pp) = default_tree_printer; + pp_format_decoder (pp.get ()) = default_tree_printer; pp->set_output_stream (fp); - dump_dot_to_pp (pp, dump_args); - pp_flush (pp); - delete pp; + dump_dot_to_pp (pp.get (), dump_args); + pp_flush (pp.get ()); } /* Dump this graph in .dot format to PATH, using DUMP_ARGS. */ diff --git a/gcc/asan.cc b/gcc/asan.cc index bc92d9c7a79..99c5d2e50d5 100644 --- a/gcc/asan.cc +++ b/gcc/asan.cc @@ -19,6 +19,7 @@ along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/attribs.cc b/gcc/attribs.cc index 0be7b83b264..311242815fa 100644 --- a/gcc/attribs.cc +++ b/gcc/attribs.cc @@ -17,6 +17,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #define INCLUDE_STRING #include "config.h" #include "system.h" @@ -2673,10 +2674,9 @@ attr_access::array_as_string (tree type) const /* Format the type using the current pretty printer. The generic tree printer does a terrible job. */ - pretty_printer *pp = global_dc->m_printer->clone (); - pp_printf (pp, "%qT", type); - typstr = pp_formatted_text (pp); - delete pp; + std::unique_ptr pp (global_dc->clone_printer ()); + pp_printf (pp.get (), "%qT", type); + typstr = pp_formatted_text (pp.get ()); return typstr; } diff --git a/gcc/auto-profile.cc b/gcc/auto-profile.cc index de59b94bcb3..242b71d1165 100644 --- a/gcc/auto-profile.cc +++ b/gcc/auto-profile.cc @@ -20,6 +20,7 @@ along with GCC; see the file COPYING3. If not see #include "config.h" #define INCLUDE_MAP +#define INCLUDE_MEMORY #define INCLUDE_SET #include "system.h" #include "coretypes.h" diff --git a/gcc/c-family/c-ada-spec.cc b/gcc/c-family/c-ada-spec.cc index fbba4436254..db5c0b5d746 100644 --- a/gcc/c-family/c-ada-spec.cc +++ b/gcc/c-family/c-ada-spec.cc @@ -19,6 +19,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/c-family/c-attribs.cc b/gcc/c-family/c-attribs.cc index 4dd2eecbea5..cf9523aacf5 100644 --- a/gcc/c-family/c-attribs.cc +++ b/gcc/c-family/c-attribs.cc @@ -17,6 +17,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #define INCLUDE_STRING #include "config.h" #include "system.h" diff --git a/gcc/c-family/c-common.cc b/gcc/c-family/c-common.cc index 7494a2dac0a..28a2d4b17df 100644 --- a/gcc/c-family/c-common.cc +++ b/gcc/c-family/c-common.cc @@ -19,6 +19,7 @@ along with GCC; see the file COPYING3. If not see #define GCC_C_COMMON_C +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/c-family/c-format.cc b/gcc/c-family/c-format.cc index f4a65a5019c..211fb3be7d9 100644 --- a/gcc/c-family/c-format.cc +++ b/gcc/c-family/c-format.cc @@ -17,6 +17,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/c-family/c-gimplify.cc b/gcc/c-family/c-gimplify.cc index 09ea1b79159..7885e295033 100644 --- a/gcc/c-family/c-gimplify.cc +++ b/gcc/c-family/c-gimplify.cc @@ -23,6 +23,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/c-family/c-indentation.cc b/gcc/c-family/c-indentation.cc index 38be7d24da0..7adec84ce2b 100644 --- a/gcc/c-family/c-indentation.cc +++ b/gcc/c-family/c-indentation.cc @@ -17,6 +17,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/c-family/c-opts.cc b/gcc/c-family/c-opts.cc index 6be65fb2f73..5eb6940a976 100644 --- a/gcc/c-family/c-opts.cc +++ b/gcc/c-family/c-opts.cc @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/c-family/c-pch.cc b/gcc/c-family/c-pch.cc index f104575d3d0..50479ad43f4 100644 --- a/gcc/c-family/c-pch.cc +++ b/gcc/c-family/c-pch.cc @@ -17,6 +17,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/c-family/c-pragma.cc b/gcc/c-family/c-pragma.cc index ed2a7a00e9e..9d7153489f9 100644 --- a/gcc/c-family/c-pragma.cc +++ b/gcc/c-family/c-pragma.cc @@ -17,6 +17,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/c-family/c-pretty-print.cc b/gcc/c-family/c-pretty-print.cc index 13806714446..fadb9e3ecfe 100644 --- a/gcc/c-family/c-pretty-print.cc +++ b/gcc/c-family/c-pretty-print.cc @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" @@ -36,6 +37,7 @@ along with GCC; see the file COPYING3. If not see #include "function.h" #include "basic-block.h" #include "gimple.h" +#include "make-unique.h" /* The pretty-printer code is primarily designed to closely follow (GNU) C and C++ grammars. That is to be contrasted with spaghetti @@ -2986,10 +2988,10 @@ c_pretty_printer::c_pretty_printer () /* c_pretty_printer's implementation of pretty_printer::clone vfunc. */ -pretty_printer * +std::unique_ptr c_pretty_printer::clone () const { - return new c_pretty_printer (*this); + return ::make_unique (*this); } /* Print the tree T in full, on file FILE. */ diff --git a/gcc/c-family/c-pretty-print.h b/gcc/c-family/c-pretty-print.h index 550e4cb6882..80854b07917 100644 --- a/gcc/c-family/c-pretty-print.h +++ b/gcc/c-family/c-pretty-print.h @@ -51,7 +51,7 @@ class c_pretty_printer : public pretty_printer { public: c_pretty_printer (); - pretty_printer *clone () const override; + std::unique_ptr clone () const override; // Format string, possibly translated. void translate_string (const char *); diff --git a/gcc/c-family/c-type-mismatch.cc b/gcc/c-family/c-type-mismatch.cc index 89646854f3c..abc8cb83cc5 100644 --- a/gcc/c-family/c-type-mismatch.cc +++ b/gcc/c-family/c-type-mismatch.cc @@ -17,6 +17,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/c-family/c-warn.cc b/gcc/c-family/c-warn.cc index 05d6e37edae..8c94888bda0 100644 --- a/gcc/c-family/c-warn.cc +++ b/gcc/c-family/c-warn.cc @@ -17,6 +17,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #define INCLUDE_STRING #include "config.h" #include "system.h" diff --git a/gcc/c/c-aux-info.cc b/gcc/c/c-aux-info.cc index f6b5980aa83..b422da0e726 100644 --- a/gcc/c/c-aux-info.cc +++ b/gcc/c/c-aux-info.cc @@ -20,6 +20,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/c/c-convert.cc b/gcc/c/c-convert.cc index 7c1064c6691..9180c6ae14e 100644 --- a/gcc/c/c-convert.cc +++ b/gcc/c/c-convert.cc @@ -23,6 +23,7 @@ along with GCC; see the file COPYING3. If not see Every language front end must have a `convert' function but what kind of conversions it does will depend on the language. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/c/c-errors.cc b/gcc/c/c-errors.cc index c6b7c108354..38b11a7c70a 100644 --- a/gcc/c/c-errors.cc +++ b/gcc/c/c-errors.cc @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/c/c-fold.cc b/gcc/c/c-fold.cc index 9ea174f79c4..06085f5f58f 100644 --- a/gcc/c/c-fold.cc +++ b/gcc/c/c-fold.cc @@ -17,6 +17,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/c/c-lang.cc b/gcc/c/c-lang.cc index 870e23b4a33..7e5604fce6b 100644 --- a/gcc/c/c-lang.cc +++ b/gcc/c/c-lang.cc @@ -18,6 +18,7 @@ along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/c/c-objc-common.cc b/gcc/c/c-objc-common.cc index eb0c4b85772..dc91373f5b9 100644 --- a/gcc/c/c-objc-common.cc +++ b/gcc/c/c-objc-common.cc @@ -17,6 +17,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" @@ -295,11 +296,11 @@ print_type (c_pretty_printer *cpp, tree t, bool *quoted, void pp_markup::element_quoted_type::print_type (pp_markup::context &ctxt) { - c_pretty_printer *cpp = (c_pretty_printer *) ctxt.m_pp.clone (); + auto pp = ctxt.m_pp.clone (); + c_pretty_printer *cpp = (c_pretty_printer *)pp.get (); cpp->set_padding (pp_none); ::print_type (cpp, m_type, &ctxt.m_quoted, m_highlight_color); pp_string (&ctxt.m_pp, pp_formatted_text (cpp)); - delete cpp; } /* Called during diagnostic message formatting process to print a diff --git a/gcc/c/c-typeck.cc b/gcc/c/c-typeck.cc index 108ea5ca3e8..2a99c0e435d 100644 --- a/gcc/c/c-typeck.cc +++ b/gcc/c/c-typeck.cc @@ -23,6 +23,7 @@ along with GCC; see the file COPYING3. If not see including computing the types of the result, C-specific error checks, and some optimization. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/c/gimple-parser.cc b/gcc/c/gimple-parser.cc index d156d83cd37..8d1db33b844 100644 --- a/gcc/c/gimple-parser.cc +++ b/gcc/c/gimple-parser.cc @@ -17,6 +17,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/calls.cc b/gcc/calls.cc index c5c26f65280..05eaa0d7b14 100644 --- a/gcc/calls.cc +++ b/gcc/calls.cc @@ -17,6 +17,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/cfganal.cc b/gcc/cfganal.cc index 35c59f3f5d2..863f88ff1ea 100644 --- a/gcc/cfganal.cc +++ b/gcc/cfganal.cc @@ -19,6 +19,7 @@ along with GCC; see the file COPYING3. If not see /* This file contains various simple utilities to analyze the CFG. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/cfgexpand.cc b/gcc/cfgexpand.cc index 6c1096363af..885f488a9d4 100644 --- a/gcc/cfgexpand.cc +++ b/gcc/cfgexpand.cc @@ -17,6 +17,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/cfghooks.cc b/gcc/cfghooks.cc index 3ced91c9639..55fdf983e1c 100644 --- a/gcc/cfghooks.cc +++ b/gcc/cfghooks.cc @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/cfgloop.cc b/gcc/cfgloop.cc index 5202c3865d1..df0ec7722bc 100644 --- a/gcc/cfgloop.cc +++ b/gcc/cfgloop.cc @@ -17,6 +17,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/cgraph.cc b/gcc/cgraph.cc index b5d096d530c..45f851d0f4a 100644 --- a/gcc/cgraph.cc +++ b/gcc/cgraph.cc @@ -24,6 +24,7 @@ along with GCC; see the file COPYING3. If not see optimization. It represents a multi-graph where nodes are functions (symbols within symbol table) and edges are call sites. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/cgraphclones.cc b/gcc/cgraphclones.cc index 4fff6873a36..ede720f4b15 100644 --- a/gcc/cgraphclones.cc +++ b/gcc/cgraphclones.cc @@ -64,6 +64,7 @@ along with GCC; see the file COPYING3. If not see only difference is that clones are not visible during the Generate Summary stage. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/cgraphunit.cc b/gcc/cgraphunit.cc index 2bd0289ffba..0052b92715a 100644 --- a/gcc/cgraphunit.cc +++ b/gcc/cgraphunit.cc @@ -157,6 +157,7 @@ along with GCC; see the file COPYING3. If not see and apply simple transformations */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/collect-utils.cc b/gcc/collect-utils.cc index 981a14a554b..5397fe2c7a0 100644 --- a/gcc/collect-utils.cc +++ b/gcc/collect-utils.cc @@ -17,6 +17,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/collect2.cc b/gcc/collect2.cc index 902014a9cc1..2bd618d27c1 100644 --- a/gcc/collect2.cc +++ b/gcc/collect2.cc @@ -24,6 +24,7 @@ along with GCC; see the file COPYING3. If not see /* Build tables of static constructors and destructors and run ld. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/common/config/aarch64/aarch64-common.cc b/gcc/common/config/aarch64/aarch64-common.cc index 64b65b7ff9e..2bfc597e333 100644 --- a/gcc/common/config/aarch64/aarch64-common.cc +++ b/gcc/common/config/aarch64/aarch64-common.cc @@ -19,6 +19,7 @@ . */ #include "config.h" +#define INCLUDE_MEMORY #define INCLUDE_STRING #include "system.h" #include "coretypes.h" diff --git a/gcc/common/config/arm/arm-common.cc b/gcc/common/config/arm/arm-common.cc index dbcbe3f6e99..68674575ccf 100644 --- a/gcc/common/config/arm/arm-common.cc +++ b/gcc/common/config/arm/arm-common.cc @@ -18,6 +18,7 @@ . */ #define INCLUDE_LIST +#define INCLUDE_MEMORY #define INCLUDE_VECTOR #define INCLUDE_ALGORITHM #include "config.h" diff --git a/gcc/common/config/avr/avr-common.cc b/gcc/common/config/avr/avr-common.cc index bb454a20856..f14a4a48e7c 100644 --- a/gcc/common/config/avr/avr-common.cc +++ b/gcc/common/config/avr/avr-common.cc @@ -17,6 +17,7 @@ along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/config/aarch64/aarch64-cc-fusion.cc b/gcc/config/aarch64/aarch64-cc-fusion.cc index 3af8c00d846..3cae4c4d8bd 100644 --- a/gcc/config/aarch64/aarch64-cc-fusion.cc +++ b/gcc/config/aarch64/aarch64-cc-fusion.cc @@ -64,6 +64,7 @@ #define INCLUDE_ALGORITHM #define INCLUDE_FUNCTIONAL #define INCLUDE_ARRAY +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/config/aarch64/aarch64-early-ra.cc b/gcc/config/aarch64/aarch64-early-ra.cc index 6e544dd6191..bbd84686e13 100644 --- a/gcc/config/aarch64/aarch64-early-ra.cc +++ b/gcc/config/aarch64/aarch64-early-ra.cc @@ -40,6 +40,7 @@ #define INCLUDE_ALGORITHM #define INCLUDE_FUNCTIONAL +#define INCLUDE_MEMORY #define INCLUDE_ARRAY #include "config.h" #include "system.h" diff --git a/gcc/config/aarch64/aarch64-sve-builtins.cc b/gcc/config/aarch64/aarch64-sve-builtins.cc index af6469fff71..ef14f8cd39d 100644 --- a/gcc/config/aarch64/aarch64-sve-builtins.cc +++ b/gcc/config/aarch64/aarch64-sve-builtins.cc @@ -19,6 +19,7 @@ #define IN_TARGET_CODE 1 +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/config/arc/arc.cc b/gcc/config/arc/arc.cc index ba7bde1de44..db8168650c7 100644 --- a/gcc/config/arc/arc.cc +++ b/gcc/config/arc/arc.cc @@ -30,6 +30,7 @@ along with GCC; see the file COPYING3. If not see #define IN_TARGET_CODE 1 +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/config/arm/aarch-common.cc b/gcc/config/arm/aarch-common.cc index aa405af8192..44012feb5be 100644 --- a/gcc/config/arm/aarch-common.cc +++ b/gcc/config/arm/aarch-common.cc @@ -23,6 +23,7 @@ #define IN_TARGET_CODE 1 +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/config/arm/arm-mve-builtins.cc b/gcc/config/arm/arm-mve-builtins.cc index 252744596ce..804eb88b6a5 100644 --- a/gcc/config/arm/arm-mve-builtins.cc +++ b/gcc/config/arm/arm-mve-builtins.cc @@ -19,6 +19,7 @@ #define IN_TARGET_CODE 1 +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/config/avr/avr-devices.cc b/gcc/config/avr/avr-devices.cc index 456a6b72c8b..83b4a2ec64c 100644 --- a/gcc/config/avr/avr-devices.cc +++ b/gcc/config/avr/avr-devices.cc @@ -20,6 +20,7 @@ #ifndef IN_GEN_AVR_MMCU_TEXI #define IN_TARGET_CODE 1 +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/config/avr/driver-avr.cc b/gcc/config/avr/driver-avr.cc index 4dcabc604e8..3eefcabe48d 100644 --- a/gcc/config/avr/driver-avr.cc +++ b/gcc/config/avr/driver-avr.cc @@ -20,6 +20,7 @@ along with GCC; see the file COPYING3. If not see #define IN_TARGET_CODE 1 +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/config/bpf/bpf.cc b/gcc/config/bpf/bpf.cc index 2051fa5b08b..aa00d149c4d 100644 --- a/gcc/config/bpf/bpf.cc +++ b/gcc/config/bpf/bpf.cc @@ -19,6 +19,7 @@ along with GCC; see the file COPYING3. If not see #define IN_TARGET_CODE 1 +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/config/bpf/btfext-out.cc b/gcc/config/bpf/btfext-out.cc index b3df7b555d5..ca6241aa52e 100644 --- a/gcc/config/bpf/btfext-out.cc +++ b/gcc/config/bpf/btfext-out.cc @@ -19,6 +19,7 @@ #define IN_TARGET_CODE 1 +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/config/bpf/core-builtins.cc b/gcc/config/bpf/core-builtins.cc index 86e2e9d6e39..deb368a1d3d 100644 --- a/gcc/config/bpf/core-builtins.cc +++ b/gcc/config/bpf/core-builtins.cc @@ -19,6 +19,7 @@ along with GCC; see the file COPYING3. If not see #define IN_TARGET_CODE 1 +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/config/darwin.cc b/gcc/config/darwin.cc index 47e41ac8a12..ae821e32012 100644 --- a/gcc/config/darwin.cc +++ b/gcc/config/darwin.cc @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/config/i386/driver-i386.cc b/gcc/config/i386/driver-i386.cc index 445f5640155..26f094cd45d 100644 --- a/gcc/config/i386/driver-i386.cc +++ b/gcc/config/i386/driver-i386.cc @@ -19,6 +19,7 @@ along with GCC; see the file COPYING3. If not see #define IN_TARGET_CODE 1 +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/config/i386/i386-builtins.cc b/gcc/config/i386/i386-builtins.cc index 4286eeb80e6..a778f049a88 100644 --- a/gcc/config/i386/i386-builtins.cc +++ b/gcc/config/i386/i386-builtins.cc @@ -18,6 +18,7 @@ along with GCC; see the file COPYING3. If not see #define IN_TARGET_CODE 1 +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/config/i386/i386-expand.cc b/gcc/config/i386/i386-expand.cc index 63f5e348d64..a5094b5b2cc 100644 --- a/gcc/config/i386/i386-expand.cc +++ b/gcc/config/i386/i386-expand.cc @@ -18,6 +18,7 @@ along with GCC; see the file COPYING3. If not see #define IN_TARGET_CODE 1 +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/config/i386/i386-features.cc b/gcc/config/i386/i386-features.cc index 3434d006943..16b1e6ca66e 100644 --- a/gcc/config/i386/i386-features.cc +++ b/gcc/config/i386/i386-features.cc @@ -18,6 +18,7 @@ along with GCC; see the file COPYING3. If not see #define IN_TARGET_CODE 1 +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/config/i386/i386-options.cc b/gcc/config/i386/i386-options.cc index 55e0210260f..5fa6e021778 100644 --- a/gcc/config/i386/i386-options.cc +++ b/gcc/config/i386/i386-options.cc @@ -18,6 +18,7 @@ along with GCC; see the file COPYING3. If not see #define IN_TARGET_CODE 1 +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/config/loongarch/loongarch-builtins.cc b/gcc/config/loongarch/loongarch-builtins.cc index cf92770de30..64529da8250 100644 --- a/gcc/config/loongarch/loongarch-builtins.cc +++ b/gcc/config/loongarch/loongarch-builtins.cc @@ -20,6 +20,7 @@ along with GCC; see the file COPYING3. If not see #define IN_TARGET_CODE 1 +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/config/mingw/winnt-cxx.cc b/gcc/config/mingw/winnt-cxx.cc index f4d7a50262b..621366e9974 100644 --- a/gcc/config/mingw/winnt-cxx.cc +++ b/gcc/config/mingw/winnt-cxx.cc @@ -20,6 +20,7 @@ along with GCC; see the file COPYING3. If not see #define IN_TARGET_CODE 1 +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/config/mingw/winnt.cc b/gcc/config/mingw/winnt.cc index 803e5f5ec85..fb4b8a48415 100644 --- a/gcc/config/mingw/winnt.cc +++ b/gcc/config/mingw/winnt.cc @@ -20,6 +20,7 @@ along with GCC; see the file COPYING3. If not see #define IN_TARGET_CODE 1 +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/config/mips/mips.cc b/gcc/config/mips/mips.cc index 173f792bf55..cd5c5970f0b 100644 --- a/gcc/config/mips/mips.cc +++ b/gcc/config/mips/mips.cc @@ -23,6 +23,7 @@ along with GCC; see the file COPYING3. If not see #define IN_TARGET_CODE 1 +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/config/msp430/driver-msp430.cc b/gcc/config/msp430/driver-msp430.cc index a11fd3d7dec..5ffa8ef35e6 100644 --- a/gcc/config/msp430/driver-msp430.cc +++ b/gcc/config/msp430/driver-msp430.cc @@ -20,6 +20,7 @@ #define IN_TARGET_CODE 1 +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/config/nvptx/mkoffload.cc b/gcc/config/nvptx/mkoffload.cc index df16ee64736..ddb1c663164 100644 --- a/gcc/config/nvptx/mkoffload.cc +++ b/gcc/config/nvptx/mkoffload.cc @@ -29,6 +29,7 @@ #define IN_TARGET_CODE 1 +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/config/nvptx/nvptx.cc b/gcc/config/nvptx/nvptx.cc index 96a1134220e..3ac61b49894 100644 --- a/gcc/config/nvptx/nvptx.cc +++ b/gcc/config/nvptx/nvptx.cc @@ -20,6 +20,7 @@ #define IN_TARGET_CODE 1 +#define INCLUDE_MEMORY #include "config.h" #include #include "system.h" diff --git a/gcc/config/riscv/riscv-avlprop.cc b/gcc/config/riscv/riscv-avlprop.cc index 91d80aa00d6..066377c5c14 100644 --- a/gcc/config/riscv/riscv-avlprop.cc +++ b/gcc/config/riscv/riscv-avlprop.cc @@ -65,6 +65,7 @@ along with GCC; see the file COPYING3. If not see #define IN_TARGET_CODE 1 #define INCLUDE_ALGORITHM #define INCLUDE_FUNCTIONAL +#define INCLUDE_MEMORY #define INCLUDE_ARRAY #include "config.h" diff --git a/gcc/config/riscv/riscv-vector-builtins.cc b/gcc/config/riscv/riscv-vector-builtins.cc index 41730c483ee..458d9b0886e 100644 --- a/gcc/config/riscv/riscv-vector-builtins.cc +++ b/gcc/config/riscv/riscv-vector-builtins.cc @@ -20,6 +20,7 @@ #define IN_TARGET_CODE 1 +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/config/riscv/riscv-vsetvl.cc b/gcc/config/riscv/riscv-vsetvl.cc index 030ffbe2ebb..0b53b20f9f6 100644 --- a/gcc/config/riscv/riscv-vsetvl.cc +++ b/gcc/config/riscv/riscv-vsetvl.cc @@ -63,6 +63,7 @@ along with GCC; see the file COPYING3. If not see #define IN_TARGET_CODE 1 #define INCLUDE_ALGORITHM #define INCLUDE_FUNCTIONAL +#define INCLUDE_MEMORY #define INCLUDE_ARRAY #include "config.h" diff --git a/gcc/config/rs6000/driver-rs6000.cc b/gcc/config/rs6000/driver-rs6000.cc index f4900724b98..fd457e72d97 100644 --- a/gcc/config/rs6000/driver-rs6000.cc +++ b/gcc/config/rs6000/driver-rs6000.cc @@ -19,6 +19,7 @@ along with GCC; see the file COPYING3. If not see #define IN_TARGET_CODE 1 +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/config/rs6000/host-darwin.cc b/gcc/config/rs6000/host-darwin.cc index e0001776339..15c40b16e67 100644 --- a/gcc/config/rs6000/host-darwin.cc +++ b/gcc/config/rs6000/host-darwin.cc @@ -19,6 +19,7 @@ #define IN_TARGET_CODE 1 +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/config/rs6000/rs6000-c.cc b/gcc/config/rs6000/rs6000-c.cc index 04882c396bf..5ff346edc2e 100644 --- a/gcc/config/rs6000/rs6000-c.cc +++ b/gcc/config/rs6000/rs6000-c.cc @@ -22,6 +22,7 @@ #define IN_TARGET_CODE 1 +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/config/s390/s390-c.cc b/gcc/config/s390/s390-c.cc index 4521a86f048..0332fb4e904 100644 --- a/gcc/config/s390/s390-c.cc +++ b/gcc/config/s390/s390-c.cc @@ -29,6 +29,7 @@ #define IN_TARGET_CODE 1 +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/config/s390/s390.cc b/gcc/config/s390/s390.cc index 25d43ae3e13..874b11274a4 100644 --- a/gcc/config/s390/s390.cc +++ b/gcc/config/s390/s390.cc @@ -22,6 +22,7 @@ along with GCC; see the file COPYING3. If not see #define IN_TARGET_CODE 1 +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/config/sol2-cxx.cc b/gcc/config/sol2-cxx.cc index aa558be585e..4f5fbc60224 100644 --- a/gcc/config/sol2-cxx.cc +++ b/gcc/config/sol2-cxx.cc @@ -17,6 +17,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/config/vms/vms-c.cc b/gcc/config/vms/vms-c.cc index d0620b4d7a5..0e9fa2f14d6 100644 --- a/gcc/config/vms/vms-c.cc +++ b/gcc/config/vms/vms-c.cc @@ -20,6 +20,7 @@ along with GCC; see the file COPYING3. If not see #define IN_TARGET_CODE 1 +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/config/xtensa/xtensa-dynconfig.cc b/gcc/config/xtensa/xtensa-dynconfig.cc index 3bd2760e4d8..6ddc02a6e9b 100644 --- a/gcc/config/xtensa/xtensa-dynconfig.cc +++ b/gcc/config/xtensa/xtensa-dynconfig.cc @@ -17,6 +17,7 @@ along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/coroutine-passes.cc b/gcc/coroutine-passes.cc index 0f8e24f8d55..ce74a0278b3 100644 --- a/gcc/coroutine-passes.cc +++ b/gcc/coroutine-passes.cc @@ -20,6 +20,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/coverage.cc b/gcc/coverage.cc index a964ed5a48f..a9825e53d69 100644 --- a/gcc/coverage.cc +++ b/gcc/coverage.cc @@ -24,6 +24,7 @@ along with GCC; see the file COPYING3. If not see #define GCOV_LINKAGE +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/cp/call.cc b/gcc/cp/call.cc index 309ab01d12d..cc25b48d362 100644 --- a/gcc/cp/call.cc +++ b/gcc/cp/call.cc @@ -22,6 +22,7 @@ along with GCC; see the file COPYING3. If not see /* High-level class interface. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/cp/class.cc b/gcc/cp/class.cc index 8c39bb4a76b..eed9df7dd95 100644 --- a/gcc/cp/class.cc +++ b/gcc/cp/class.cc @@ -21,6 +21,7 @@ along with GCC; see the file COPYING3. If not see /* High-level class interface. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/cp/constexpr.cc b/gcc/cp/constexpr.cc index 4e4df94f420..ad68afef96e 100644 --- a/gcc/cp/constexpr.cc +++ b/gcc/cp/constexpr.cc @@ -20,6 +20,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/cp/constraint.cc b/gcc/cp/constraint.cc index cf0e5d37571..8a36b9c88c4 100644 --- a/gcc/cp/constraint.cc +++ b/gcc/cp/constraint.cc @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/cp/contracts.cc b/gcc/cp/contracts.cc index 4d2849a289a..2a55b87bd03 100644 --- a/gcc/cp/contracts.cc +++ b/gcc/cp/contracts.cc @@ -130,6 +130,7 @@ along with GCC; see the file COPYING3. If not see More helpful for optimization might be to make the contracts a wrapper function that could be inlined into the caller, the callee, or both. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/cp/coroutines.cc b/gcc/cp/coroutines.cc index 86a5ac8999a..ef64a98972b 100644 --- a/gcc/cp/coroutines.cc +++ b/gcc/cp/coroutines.cc @@ -20,6 +20,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/cp/cp-gimplify.cc b/gcc/cp/cp-gimplify.cc index 003e68f1ea7..68f651e9605 100644 --- a/gcc/cp/cp-gimplify.cc +++ b/gcc/cp/cp-gimplify.cc @@ -19,6 +19,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/cp/cp-lang.cc b/gcc/cp/cp-lang.cc index e1e2ab2e396..3959b3194e5 100644 --- a/gcc/cp/cp-lang.cc +++ b/gcc/cp/cp-lang.cc @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/cp/cp-objcp-common.cc b/gcc/cp/cp-objcp-common.cc index cd379514991..7a0636f1653 100644 --- a/gcc/cp/cp-objcp-common.cc +++ b/gcc/cp/cp-objcp-common.cc @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/cp/cp-ubsan.cc b/gcc/cp/cp-ubsan.cc index c4ae0fe7eea..1055714fa35 100644 --- a/gcc/cp/cp-ubsan.cc +++ b/gcc/cp/cp-ubsan.cc @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/cp/cvt.cc b/gcc/cp/cvt.cc index 526937d3618..54e700ceeda 100644 --- a/gcc/cp/cvt.cc +++ b/gcc/cp/cvt.cc @@ -24,6 +24,7 @@ along with GCC; see the file COPYING3. If not see Every language front end must have a `convert' function but what kind of conversions it does will depend on the language. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/cp/cxx-pretty-print.cc b/gcc/cp/cxx-pretty-print.cc index 41e6bdfdda5..c0608ac0b26 100644 --- a/gcc/cp/cxx-pretty-print.cc +++ b/gcc/cp/cxx-pretty-print.cc @@ -18,12 +18,14 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" #include "cp-tree.h" #include "cxx-pretty-print.h" #include "tree-pretty-print.h" +#include "make-unique.h" static void pp_cxx_unqualified_id (cxx_pretty_printer *, tree); static void pp_cxx_nested_name_specifier (cxx_pretty_printer *, tree); @@ -2927,8 +2929,8 @@ cxx_pretty_printer::cxx_pretty_printer () /* cxx_pretty_printer's implementation of pretty_printer::clone vfunc. */ -pretty_printer * +std::unique_ptr cxx_pretty_printer::clone () const { - return new cxx_pretty_printer (*this); + return ::make_unique (*this); } diff --git a/gcc/cp/cxx-pretty-print.h b/gcc/cp/cxx-pretty-print.h index a4fcf7c7102..f0865cc9d8c 100644 --- a/gcc/cp/cxx-pretty-print.h +++ b/gcc/cp/cxx-pretty-print.h @@ -34,7 +34,7 @@ class cxx_pretty_printer : public c_pretty_printer public: cxx_pretty_printer (); - pretty_printer *clone () const override; + std::unique_ptr clone () const override; void constant (tree) final override; void id_expression (tree) final override; diff --git a/gcc/cp/decl2.cc b/gcc/cp/decl2.cc index a0c319086d7..a455eb481b1 100644 --- a/gcc/cp/decl2.cc +++ b/gcc/cp/decl2.cc @@ -26,6 +26,7 @@ along with GCC; see the file COPYING3. If not see /* ??? not all decl nodes are given the most useful possible line numbers. For example, the CONST_DECLs for enum values. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/cp/dump.cc b/gcc/cp/dump.cc index aafb62ffaa0..8166bbfdee6 100644 --- a/gcc/cp/dump.cc +++ b/gcc/cp/dump.cc @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/cp/except.cc b/gcc/cp/except.cc index 7b4abd1f56e..e14a9fd3f9c 100644 --- a/gcc/cp/except.cc +++ b/gcc/cp/except.cc @@ -21,6 +21,7 @@ along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/cp/expr.cc b/gcc/cp/expr.cc index de4991e616c..e5ec2352f57 100644 --- a/gcc/cp/expr.cc +++ b/gcc/cp/expr.cc @@ -19,6 +19,7 @@ along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/cp/friend.cc b/gcc/cp/friend.cc index 2e70d0160c4..5261daa4994 100644 --- a/gcc/cp/friend.cc +++ b/gcc/cp/friend.cc @@ -17,6 +17,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/cp/init.cc b/gcc/cp/init.cc index 10b83efa850..d72964d2b74 100644 --- a/gcc/cp/init.cc +++ b/gcc/cp/init.cc @@ -20,6 +20,7 @@ along with GCC; see the file COPYING3. If not see /* High-level class interface. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/cp/lambda.cc b/gcc/cp/lambda.cc index d51b513f0fa..1453bc51d92 100644 --- a/gcc/cp/lambda.cc +++ b/gcc/cp/lambda.cc @@ -21,6 +21,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/cp/logic.cc b/gcc/cp/logic.cc index fab2c357dc4..f36abb2d4e4 100644 --- a/gcc/cp/logic.cc +++ b/gcc/cp/logic.cc @@ -20,6 +20,7 @@ along with GCC; see the file COPYING3. If not see #include "config.h" #define INCLUDE_LIST +#define INCLUDE_MEMORY #include "system.h" #include "coretypes.h" #include "tm.h" diff --git a/gcc/cp/mangle.cc b/gcc/cp/mangle.cc index 17988d69e1e..828e3263357 100644 --- a/gcc/cp/mangle.cc +++ b/gcc/cp/mangle.cc @@ -44,6 +44,7 @@ along with GCC; see the file COPYING3. If not see mangle_ctor_vtbl_for_type: `C-in-B' constructor virtual table data mangle_thunk: thunk function or entry */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/cp/method.cc b/gcc/cp/method.cc index d704db2af06..adffa9ba0f3 100644 --- a/gcc/cp/method.cc +++ b/gcc/cp/method.cc @@ -21,6 +21,7 @@ along with GCC; see the file COPYING3. If not see /* Handle method declarations. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/cp/optimize.cc b/gcc/cp/optimize.cc index 8429d856728..f93e0262fa7 100644 --- a/gcc/cp/optimize.cc +++ b/gcc/cp/optimize.cc @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/cp/pt.cc b/gcc/cp/pt.cc index b590c32345f..e20038a81ee 100644 --- a/gcc/cp/pt.cc +++ b/gcc/cp/pt.cc @@ -28,6 +28,7 @@ along with GCC; see the file COPYING3. If not see #include "config.h" #define INCLUDE_ALGORITHM // for std::equal +#define INCLUDE_MEMORY #include "system.h" #include "coretypes.h" #include "cp-tree.h" diff --git a/gcc/cp/ptree.cc b/gcc/cp/ptree.cc index 15e46752d01..77bffa0b899 100644 --- a/gcc/cp/ptree.cc +++ b/gcc/cp/ptree.cc @@ -19,6 +19,7 @@ along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/cp/rtti.cc b/gcc/cp/rtti.cc index cc006ea927f..fff89856e6b 100644 --- a/gcc/cp/rtti.cc +++ b/gcc/cp/rtti.cc @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/cp/search.cc b/gcc/cp/search.cc index 54eb4f4010f..2f5df8a2d40 100644 --- a/gcc/cp/search.cc +++ b/gcc/cp/search.cc @@ -21,6 +21,7 @@ along with GCC; see the file COPYING3. If not see /* High-level class interface. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/cp/semantics.cc b/gcc/cp/semantics.cc index dabfb1ff53f..8c1a8b3c68d 100644 --- a/gcc/cp/semantics.cc +++ b/gcc/cp/semantics.cc @@ -23,6 +23,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/cp/tree.cc b/gcc/cp/tree.cc index c80ee068958..28c4a7654f4 100644 --- a/gcc/cp/tree.cc +++ b/gcc/cp/tree.cc @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/cp/typeck.cc b/gcc/cp/typeck.cc index bfc0c560c10..90da2fa7fa4 100644 --- a/gcc/cp/typeck.cc +++ b/gcc/cp/typeck.cc @@ -24,6 +24,7 @@ along with GCC; see the file COPYING3. If not see including computing the types of the result, C and C++ specific error checks, and some optimization. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/cp/typeck2.cc b/gcc/cp/typeck2.cc index 79b397a69fa..9f57020e253 100644 --- a/gcc/cp/typeck2.cc +++ b/gcc/cp/typeck2.cc @@ -25,6 +25,7 @@ along with GCC; see the file COPYING3. If not see including computing the types of the result, C and C++ specific error checks, and some optimization. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/cp/vtable-class-hierarchy.cc b/gcc/cp/vtable-class-hierarchy.cc index afe1e96f5e2..7e4f613c205 100644 --- a/gcc/cp/vtable-class-hierarchy.cc +++ b/gcc/cp/vtable-class-hierarchy.cc @@ -110,6 +110,7 @@ along with GCC; see the file COPYING3. If not see gcc/vtable-verify.h, because they are used both here and in gcc/vtable-verify.cc. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/d/d-attribs.cc b/gcc/d/d-attribs.cc index 0f7ca10e017..873140ee7c8 100644 --- a/gcc/d/d-attribs.cc +++ b/gcc/d/d-attribs.cc @@ -18,6 +18,7 @@ along with GCC; see the file COPYING3. If not see /* Implementation of attribute handlers for user defined attributes and internal built-in functions. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/d/d-builtins.cc b/gcc/d/d-builtins.cc index 4546c0e9b56..2ca02fe691c 100644 --- a/gcc/d/d-builtins.cc +++ b/gcc/d/d-builtins.cc @@ -15,6 +15,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/d/d-codegen.cc b/gcc/d/d-codegen.cc index 2b3089b5f6d..eeeb48defa2 100644 --- a/gcc/d/d-codegen.cc +++ b/gcc/d/d-codegen.cc @@ -15,6 +15,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/d/d-convert.cc b/gcc/d/d-convert.cc index 5c79cdf6e1e..a07c7d8ba68 100644 --- a/gcc/d/d-convert.cc +++ b/gcc/d/d-convert.cc @@ -15,6 +15,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/d/d-diagnostic.cc b/gcc/d/d-diagnostic.cc index 373075ca54d..d584d2ac2b2 100644 --- a/gcc/d/d-diagnostic.cc +++ b/gcc/d/d-diagnostic.cc @@ -15,6 +15,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/d/d-frontend.cc b/gcc/d/d-frontend.cc index 0d7f4a3ec7f..c3e5d8594ad 100644 --- a/gcc/d/d-frontend.cc +++ b/gcc/d/d-frontend.cc @@ -15,6 +15,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/d/d-lang.cc b/gcc/d/d-lang.cc index 89ffa7e61ea..2aa2a3f9767 100644 --- a/gcc/d/d-lang.cc +++ b/gcc/d/d-lang.cc @@ -15,6 +15,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/d/d-longdouble.cc b/gcc/d/d-longdouble.cc index e4c8c5e6eb0..ba10a356909 100644 --- a/gcc/d/d-longdouble.cc +++ b/gcc/d/d-longdouble.cc @@ -15,6 +15,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/d/d-target.cc b/gcc/d/d-target.cc index dd46e535891..17cae450623 100644 --- a/gcc/d/d-target.cc +++ b/gcc/d/d-target.cc @@ -15,6 +15,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/d/decl.cc b/gcc/d/decl.cc index 0a87c85ae2e..0afaa71664d 100644 --- a/gcc/d/decl.cc +++ b/gcc/d/decl.cc @@ -15,6 +15,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/d/expr.cc b/gcc/d/expr.cc index d055e0b4025..a690f2ef2cf 100644 --- a/gcc/d/expr.cc +++ b/gcc/d/expr.cc @@ -15,6 +15,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/d/intrinsics.cc b/gcc/d/intrinsics.cc index c895c1a1a52..34143b343e8 100644 --- a/gcc/d/intrinsics.cc +++ b/gcc/d/intrinsics.cc @@ -15,6 +15,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/d/modules.cc b/gcc/d/modules.cc index b111ee90cea..f9b4a1e8e41 100644 --- a/gcc/d/modules.cc +++ b/gcc/d/modules.cc @@ -15,6 +15,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/d/toir.cc b/gcc/d/toir.cc index a6848f2ffa2..2bbba1035c7 100644 --- a/gcc/d/toir.cc +++ b/gcc/d/toir.cc @@ -15,6 +15,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/d/typeinfo.cc b/gcc/d/typeinfo.cc index cadcbe8164e..56aaf29d54e 100644 --- a/gcc/d/typeinfo.cc +++ b/gcc/d/typeinfo.cc @@ -15,6 +15,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/d/types.cc b/gcc/d/types.cc index 9fa2f888cb2..2f78c917de2 100644 --- a/gcc/d/types.cc +++ b/gcc/d/types.cc @@ -15,6 +15,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/data-streamer-in.cc b/gcc/data-streamer-in.cc index 07dbc5e2bc3..64dec35296c 100644 --- a/gcc/data-streamer-in.cc +++ b/gcc/data-streamer-in.cc @@ -20,6 +20,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/data-streamer-out.cc b/gcc/data-streamer-out.cc index c237e30f704..95715436cdc 100644 --- a/gcc/data-streamer-out.cc +++ b/gcc/data-streamer-out.cc @@ -20,6 +20,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/data-streamer.cc b/gcc/data-streamer.cc index 896413e8d2b..1caf72f9e96 100644 --- a/gcc/data-streamer.cc +++ b/gcc/data-streamer.cc @@ -19,6 +19,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/diagnostic-buffer.h b/gcc/diagnostic-buffer.h index 07acd044920..deb933a8763 100644 --- a/gcc/diagnostic-buffer.h +++ b/gcc/diagnostic-buffer.h @@ -59,7 +59,6 @@ class diagnostic_buffer friend class diagnostic_context; diagnostic_buffer (diagnostic_context &ctxt); - ~diagnostic_buffer (); void dump (FILE *out, int indent) const; void DEBUG_FUNCTION dump () const { dump (stderr, 0); } @@ -77,7 +76,7 @@ class diagnostic_buffer void ensure_per_format_buffer (); diagnostic_context &m_ctxt; - diagnostic_per_format_buffer *m_per_format_buffer; + std::unique_ptr m_per_format_buffer; /* The number of buffered diagnostics of each kind. */ diagnostic_counters m_diagnostic_counters; diff --git a/gcc/diagnostic-client-data-hooks.h b/gcc/diagnostic-client-data-hooks.h index a67a3dbff47..9e2bd606378 100644 --- a/gcc/diagnostic-client-data-hooks.h +++ b/gcc/diagnostic-client-data-hooks.h @@ -53,7 +53,7 @@ class diagnostic_client_data_hooks for use in the compiler (i.e. with knowledge of "tree", access to langhooks, etc). */ -extern diagnostic_client_data_hooks *make_compiler_data_hooks (); +extern std::unique_ptr make_compiler_data_hooks (); class diagnostic_client_plugin_info; diff --git a/gcc/diagnostic-format-json.cc b/gcc/diagnostic-format-json.cc index 022e3a9ae7d..7b89ee81d70 100644 --- a/gcc/diagnostic-format-json.cc +++ b/gcc/diagnostic-format-json.cc @@ -72,9 +72,10 @@ public: diagnostic_output_format::dump (out, indent); } - diagnostic_per_format_buffer *make_per_format_buffer () final override + std::unique_ptr + make_per_format_buffer () final override { - return new diagnostic_json_format_buffer (*this); + return ::make_unique (*this); } void set_buffer (diagnostic_per_format_buffer *base_buffer) final override { @@ -505,7 +506,7 @@ diagnostic_output_format_init_json (diagnostic_context &context, pp_show_color (fmt->get_printer ()) = false; context.set_show_highlight_colors (false); - context.set_output_format (fmt.release ()); + context.set_output_format (std::move (fmt)); } /* Populate CONTEXT in preparation for JSON output to stderr. */ diff --git a/gcc/diagnostic-format-sarif.cc b/gcc/diagnostic-format-sarif.cc index 4ce35619000..a5c6ce29085 100644 --- a/gcc/diagnostic-format-sarif.cc +++ b/gcc/diagnostic-format-sarif.cc @@ -3409,9 +3409,10 @@ public: diagnostic_output_format::dump (out, indent); } - diagnostic_per_format_buffer *make_per_format_buffer () final override + std::unique_ptr + make_per_format_buffer () final override { - return new diagnostic_sarif_format_buffer (m_builder); + return ::make_unique (m_builder); } void set_buffer (diagnostic_per_format_buffer *base_buffer) final override { @@ -3657,7 +3658,7 @@ diagnostic_output_format_init_sarif (diagnostic_context &context, context.m_printer->set_token_printer (&fmt->get_builder ().get_token_printer ()); - context.set_output_format (fmt.release ()); + context.set_output_format (std::move (fmt)); } /* Populate CONTEXT in preparation for SARIF output to stderr. */ @@ -4255,7 +4256,7 @@ test_message_with_embedded_link (enum sarif_version version) }; test_sarif_diagnostic_context dc ("test.c", version); - dc.set_urlifier (new test_urlifier ()); + dc.set_urlifier (::make_unique ()); rich_location richloc (line_table, UNKNOWN_LOCATION); dc.report (DK_ERROR, richloc, nullptr, 0, "foo %<-foption%> % bar"); diff --git a/gcc/diagnostic-format-text.cc b/gcc/diagnostic-format-text.cc index 03f5518d620..c23ac6c505d 100644 --- a/gcc/diagnostic-format-text.cc +++ b/gcc/diagnostic-format-text.cc @@ -19,6 +19,7 @@ along with GCC; see the file COPYING3. If not see #include "config.h" +#define INCLUDE_MEMORY #define INCLUDE_VECTOR #include "system.h" #include "coretypes.h" @@ -34,6 +35,7 @@ along with GCC; see the file COPYING3. If not see #include "diagnostic-format-text.h" #include "diagnostic-buffer.h" #include "text-art/theme.h" +#include "make-unique.h" /* Disable warnings about quoting issues in the pp_xxx calls below that (intentionally) don't follow GCC diagnostic conventions. */ @@ -186,10 +188,10 @@ diagnostic_text_output_format::set_buffer (diagnostic_per_format_buffer *base) } } -diagnostic_per_format_buffer * +std::unique_ptr diagnostic_text_output_format::make_per_format_buffer () { - return new diagnostic_text_format_buffer (*this); + return ::make_unique (*this); } /* Implementation of diagnostic_output_format::on_report_diagnostic vfunc diff --git a/gcc/diagnostic-format-text.h b/gcc/diagnostic-format-text.h index 12a65bf6ee8..b43501eaa4a 100644 --- a/gcc/diagnostic-format-text.h +++ b/gcc/diagnostic-format-text.h @@ -43,7 +43,8 @@ public: void dump (FILE *out, int indent) const override; - diagnostic_per_format_buffer *make_per_format_buffer () final override; + std::unique_ptr + make_per_format_buffer () final override; void set_buffer (diagnostic_per_format_buffer *) final override; void on_begin_group () override {} diff --git a/gcc/diagnostic-format.h b/gcc/diagnostic-format.h index e2ae155eec1..a38d177ce8d 100644 --- a/gcc/diagnostic-format.h +++ b/gcc/diagnostic-format.h @@ -38,7 +38,8 @@ public: /* Vfunc for making an appropriate diagnostic_per_format_buffer subclass for this format. */ - virtual diagnostic_per_format_buffer *make_per_format_buffer () = 0; + virtual std::unique_ptr + make_per_format_buffer () = 0; /* Vfunc to be called when call a diagnostic_buffer is set on a diagnostic_context, to update this format. The per_format_buffer diff --git a/gcc/diagnostic-global-context.cc b/gcc/diagnostic-global-context.cc index 9e151905a6b..e82588e5404 100644 --- a/gcc/diagnostic-global-context.cc +++ b/gcc/diagnostic-global-context.cc @@ -22,6 +22,7 @@ along with GCC; see the file COPYING3. If not see /* This file implements the parts of the language independent aspect of diagnostic messages that implicitly use global_dc. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/diagnostic-macro-unwinding.cc b/gcc/diagnostic-macro-unwinding.cc index a9838ffb52c..38f827f6638 100644 --- a/gcc/diagnostic-macro-unwinding.cc +++ b/gcc/diagnostic-macro-unwinding.cc @@ -17,6 +17,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/diagnostic-show-locus.cc b/gcc/diagnostic-show-locus.cc index 415de42cbc7..79499dc549d 100644 --- a/gcc/diagnostic-show-locus.cc +++ b/gcc/diagnostic-show-locus.cc @@ -19,6 +19,7 @@ along with GCC; see the file COPYING3. If not see . */ #include "config.h" +#define INCLUDE_MEMORY #define INCLUDE_VECTOR #include "system.h" #include "coretypes.h" diff --git a/gcc/diagnostic-spec.cc b/gcc/diagnostic-spec.cc index addaf089f03..77e4b67dc88 100644 --- a/gcc/diagnostic-spec.cc +++ b/gcc/diagnostic-spec.cc @@ -19,6 +19,7 @@ along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/diagnostic.cc b/gcc/diagnostic.cc index 71230089657..f1cef0b01a8 100644 --- a/gcc/diagnostic.cc +++ b/gcc/diagnostic.cc @@ -454,19 +454,21 @@ diagnostic_context::execution_failed_p () const } void -diagnostic_context::set_output_format (diagnostic_output_format *output_format) +diagnostic_context:: +set_output_format (std::unique_ptr output_format) { - /* Ideally we'd use a std::unique_ptr here. */ delete m_output_format; - m_output_format = output_format; + /* Ideally this field would be a std::unique_ptr. */ + m_output_format = output_format.release (); } void -diagnostic_context::set_client_data_hooks (diagnostic_client_data_hooks *hooks) +diagnostic_context:: +set_client_data_hooks (std::unique_ptr hooks) { - /* Ideally we'd use a std::unique_ptr here. */ delete m_client_data_hooks; - m_client_data_hooks = hooks; + /* Ideally the field would be a std::unique_ptr here. */ + m_client_data_hooks = hooks.release (); } void @@ -483,20 +485,21 @@ diagnostic_context::set_original_argv (unique_argv original_argv) } void -diagnostic_context::set_option_manager (diagnostic_option_manager *mgr, - unsigned lang_mask) +diagnostic_context:: +set_option_manager (std::unique_ptr mgr, + unsigned lang_mask) { delete m_option_mgr; - m_option_mgr = mgr; + m_option_mgr = mgr.release (); m_lang_mask = lang_mask; } void -diagnostic_context::set_urlifier (urlifier *urlifier) +diagnostic_context::set_urlifier (std::unique_ptr urlifier) { - /* Ideally we'd use a std::unique_ptr here. */ delete m_urlifier; - m_urlifier = urlifier; + /* Ideally the field would be a std::unique_ptr here. */ + m_urlifier = urlifier.release (); } void @@ -1715,7 +1718,7 @@ diagnostic_context::set_diagnostic_buffer (diagnostic_buffer *buffer) { buffer->ensure_per_format_buffer (); gcc_assert (buffer->m_per_format_buffer); - m_output_format->set_buffer (buffer->m_per_format_buffer); + m_output_format->set_buffer (buffer->m_per_format_buffer.get ()); } else m_output_format->set_buffer (nullptr); @@ -1793,16 +1796,10 @@ diagnostic_counters::clear () /* class diagnostic_buffer. */ diagnostic_buffer::diagnostic_buffer (diagnostic_context &ctxt) -: m_ctxt (ctxt), - m_per_format_buffer (nullptr) +: m_ctxt (ctxt) { } -diagnostic_buffer::~diagnostic_buffer () -{ - delete m_per_format_buffer; -} - void diagnostic_buffer::dump (FILE *out, int indent) const { diff --git a/gcc/diagnostic.h b/gcc/diagnostic.h index f1f475540de..3da1ae9c801 100644 --- a/gcc/diagnostic.h +++ b/gcc/diagnostic.h @@ -21,6 +21,14 @@ along with GCC; see the file COPYING3. If not see #ifndef GCC_DIAGNOSTIC_H #define GCC_DIAGNOSTIC_H +/* This header uses std::unique_ptr, but can't be directly + included due to issues with macros. Hence it must be included from + system.h by defining INCLUDE_MEMORY in any source file using it. */ + +#ifndef INCLUDE_MEMORY +# error "You must define INCLUDE_MEMORY before including system.h to use diagnostic.h" +#endif + #include "unique-argv.h" #include "rich-location.h" #include "pretty-print.h" @@ -574,10 +582,10 @@ public: } /* Various setters for use by option-handling logic. */ - void set_output_format (diagnostic_output_format *output_format); + void set_output_format (std::unique_ptr output_format); void set_text_art_charset (enum diagnostic_text_art_charset charset); - void set_client_data_hooks (diagnostic_client_data_hooks *hooks); - void set_urlifier (urlifier *); + void set_client_data_hooks (std::unique_ptr hooks); + void set_urlifier (std::unique_ptr); void create_edit_context (); void set_warning_as_error_requested (bool val) { @@ -672,7 +680,7 @@ public: } void - set_option_manager (diagnostic_option_manager *mgr, + set_option_manager (std::unique_ptr mgr, unsigned lang_mask); unsigned get_lang_mask () const @@ -700,6 +708,7 @@ public: return m_option_classifier.pch_restore (f); } + void set_diagnostic_buffer (diagnostic_buffer *); diagnostic_buffer *get_diagnostic_buffer () const { @@ -708,6 +717,11 @@ public: void clear_diagnostic_buffer (diagnostic_buffer &); void flush_diagnostic_buffer (diagnostic_buffer &); + std::unique_ptr clone_printer () const + { + return m_printer->clone (); + } + private: void error_recursion () ATTRIBUTE_NORETURN; @@ -722,11 +736,15 @@ private: Ideally, all of these would be private. */ public: - /* Where most of the diagnostic formatting work is done. */ + /* Where most of the diagnostic formatting work is done. + Owned by the context; this would be a std::unique_ptr if + diagnostic_context had a proper ctor. */ pretty_printer *m_printer; private: - /* Cache of source code. */ + /* Cache of source code. + Owned by the context; this would be a std::unique_ptr if + diagnostic_context had a proper ctor. */ file_cache *m_file_cache; /* The number of times we have issued diagnostics. */ @@ -818,11 +836,15 @@ public: void (*m_adjust_diagnostic_info)(diagnostic_context *, diagnostic_info *); private: + /* Owned by the context; this would be a std::unique_ptr if + diagnostic_context had a proper ctor. */ diagnostic_option_manager *m_option_mgr; unsigned m_lang_mask; /* An optional hook for adding URLs to quoted text strings in - diagnostics. Only used for the main diagnostic message. */ + diagnostics. Only used for the main diagnostic message. + Owned by the context; this would be a std::unique_ptr if + diagnostic_context had a proper ctor. */ urlifier *m_urlifier; public: @@ -865,7 +887,9 @@ private: enum diagnostics_escape_format m_escape_format; /* If non-NULL, an edit_context to which fix-it hints should be - applied, for generating patches. */ + applied, for generating patches. + Owned by the context; this would be a std::unique_ptr if + diagnostic_context had a proper ctor. */ edit_context *m_edit_context_ptr; /* Fields relating to diagnostic groups. */ @@ -879,7 +903,9 @@ private: } m_diagnostic_groups; /* How to output diagnostics (text vs a structured format such as JSON). - Must be non-NULL; owned by context. */ + Must be non-NULL; owned by context. + This would be a std::unique_ptr if diagnostic_context had a proper + ctor. */ diagnostic_output_format *m_output_format; /* Callback to set the locations of call sites along the inlining @@ -891,14 +917,18 @@ private: /* A bundle of hooks for providing data to the context about its client e.g. version information, plugins, etc. Used by SARIF output to give metadata about the client that's - producing diagnostics. */ + producing diagnostics. + Owned by the context; this would be a std::unique_ptr if + diagnostic_context had a proper ctor. */ diagnostic_client_data_hooks *m_client_data_hooks; /* Support for diagrams. */ struct { /* Theme to use when generating diagrams. - Can be NULL (if text art is disabled). */ + Can be NULL (if text art is disabled). + Owned by the context; this would be a std::unique_ptr if + diagnostic_context had a proper ctor. */ text_art::theme *m_theme; } m_diagrams; diff --git a/gcc/digraph.cc b/gcc/digraph.cc index b323764a93c..7b2726d24fe 100644 --- a/gcc/digraph.cc +++ b/gcc/digraph.cc @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/dwarf2out.cc b/gcc/dwarf2out.cc index 38aedb64470..fc23e4ba460 100644 --- a/gcc/dwarf2out.cc +++ b/gcc/dwarf2out.cc @@ -55,6 +55,7 @@ along with GCC; see the file COPYING3. If not see DW_CFA_... = DWARF2 CFA call frame instruction DW_TAG_... = DWARF2 DIE tag */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/edit-context.cc b/gcc/edit-context.cc index 37ac4989de0..f51ebf0e515 100644 --- a/gcc/edit-context.cc +++ b/gcc/edit-context.cc @@ -17,6 +17,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/except.cc b/gcc/except.cc index 5bb5edbd806..4bec795010b 100644 --- a/gcc/except.cc +++ b/gcc/except.cc @@ -109,6 +109,7 @@ along with GCC; see the file COPYING3. If not see output_call_frame_info (dwarf2out.cc) emits the required unwind data. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/expr.cc b/gcc/expr.cc index 87f9e002c07..51a7e5a60d3 100644 --- a/gcc/expr.cc +++ b/gcc/expr.cc @@ -17,6 +17,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/file-prefix-map.cc b/gcc/file-prefix-map.cc index 6b432e2a15a..6841559c5ed 100644 --- a/gcc/file-prefix-map.cc +++ b/gcc/file-prefix-map.cc @@ -15,6 +15,7 @@ along with this program; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/final.cc b/gcc/final.cc index 5d911586de5..11141f2b56c 100644 --- a/gcc/final.cc +++ b/gcc/final.cc @@ -44,6 +44,7 @@ along with GCC; see the file COPYING3. If not see #include "config.h" #define INCLUDE_ALGORITHM /* reverse */ +#define INCLUDE_MEMORY #include "system.h" #include "coretypes.h" #include "backend.h" diff --git a/gcc/fortran/arith.cc b/gcc/fortran/arith.cc index a214b8bc1b3..3ecbbd30cfa 100644 --- a/gcc/fortran/arith.cc +++ b/gcc/fortran/arith.cc @@ -23,6 +23,7 @@ along with GCC; see the file COPYING3. If not see would evaluate them. We use the GNU MP library and the MPFR library to do arithmetic, and this file provides the interface. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/fortran/array.cc b/gcc/fortran/array.cc index 6dedaed3d4d..e650d85eb8c 100644 --- a/gcc/fortran/array.cc +++ b/gcc/fortran/array.cc @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/fortran/bbt.cc b/gcc/fortran/bbt.cc index f564ce104e8..556baeec71d 100644 --- a/gcc/fortran/bbt.cc +++ b/gcc/fortran/bbt.cc @@ -35,6 +35,7 @@ along with GCC; see the file COPYING3. If not see This implementation is based on Stefan Nilsson's article in the July 1997 Doctor Dobb's Journal, "Treaps in Java". */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/fortran/check.cc b/gcc/fortran/check.cc index e90073ad4b0..304ca1b9ae8 100644 --- a/gcc/fortran/check.cc +++ b/gcc/fortran/check.cc @@ -25,6 +25,7 @@ along with GCC; see the file COPYING3. If not see has been sorted into the right order and has NULL arguments in the correct places for missing optional arguments. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/fortran/class.cc b/gcc/fortran/class.cc index f9e0d416e48..4b2234a958f 100644 --- a/gcc/fortran/class.cc +++ b/gcc/fortran/class.cc @@ -56,6 +56,7 @@ along with GCC; see the file COPYING3. If not see type-bound procedures. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/fortran/constructor.cc b/gcc/fortran/constructor.cc index 942e2639732..8a4e11d8686 100644 --- a/gcc/fortran/constructor.cc +++ b/gcc/fortran/constructor.cc @@ -17,6 +17,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/fortran/convert.cc b/gcc/fortran/convert.cc index 674e3f425e8..187bda64063 100644 --- a/gcc/fortran/convert.cc +++ b/gcc/fortran/convert.cc @@ -22,6 +22,7 @@ along with GCC; see the file COPYING3. If not see different data types for the translation of the gfortran internal representation to GIMPLE. The only entry point is `convert'. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/fortran/cpp.cc b/gcc/fortran/cpp.cc index 7c5f00cfd69..9d662ac5ab2 100644 --- a/gcc/fortran/cpp.cc +++ b/gcc/fortran/cpp.cc @@ -16,6 +16,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/fortran/data.cc b/gcc/fortran/data.cc index e7202455b3e..3aa869be1aa 100644 --- a/gcc/fortran/data.cc +++ b/gcc/fortran/data.cc @@ -32,6 +32,7 @@ along with GCC; see the file COPYING3. If not see etc., to convert the initial value. Refer to trans-expr.cc and trans-array.cc. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/fortran/decl.cc b/gcc/fortran/decl.cc index 151578954dc..499a8462629 100644 --- a/gcc/fortran/decl.cc +++ b/gcc/fortran/decl.cc @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/fortran/dependency.cc b/gcc/fortran/dependency.cc index 15edf1af9df..2d3db9541bb 100644 --- a/gcc/fortran/dependency.cc +++ b/gcc/fortran/dependency.cc @@ -23,6 +23,7 @@ along with GCC; see the file COPYING3. If not see have different dependency checking functions for different types if dependencies. Ideally these would probably be merged. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/fortran/dump-parse-tree.cc b/gcc/fortran/dump-parse-tree.cc index bc8a95a809b..ea5d2ab66a6 100644 --- a/gcc/fortran/dump-parse-tree.cc +++ b/gcc/fortran/dump-parse-tree.cc @@ -30,6 +30,7 @@ along with GCC; see the file COPYING3. If not see TODO: Dump DATA. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/fortran/error.cc b/gcc/fortran/error.cc index 64e1ce5d247..b1eda94ccb6 100644 --- a/gcc/fortran/error.cc +++ b/gcc/fortran/error.cc @@ -24,6 +24,7 @@ along with GCC; see the file COPYING3. If not see for possible use later. If a line does not match a legal construction, then the saved error message is reported. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/fortran/expr.cc b/gcc/fortran/expr.cc index b3e0bf1fd91..01fbc442546 100644 --- a/gcc/fortran/expr.cc +++ b/gcc/fortran/expr.cc @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/fortran/f95-lang.cc b/gcc/fortran/f95-lang.cc index 770f31b221d..611c299b654 100644 --- a/gcc/fortran/f95-lang.cc +++ b/gcc/fortran/f95-lang.cc @@ -22,6 +22,7 @@ along with GCC; see the file COPYING3. If not see /* declare required prototypes: */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/fortran/frontend-passes.cc b/gcc/fortran/frontend-passes.cc index 405074ecb02..3a36b1ddf73 100644 --- a/gcc/fortran/frontend-passes.cc +++ b/gcc/fortran/frontend-passes.cc @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/fortran/interface.cc b/gcc/fortran/interface.cc index dbcbed8bf30..69519fe3168 100644 --- a/gcc/fortran/interface.cc +++ b/gcc/fortran/interface.cc @@ -63,6 +63,7 @@ along with GCC; see the file COPYING3. If not see formal argument list points to symbols within the same namespace as the program unit name. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/fortran/intrinsic.cc b/gcc/fortran/intrinsic.cc index 114f1b6c045..83b65d34e43 100644 --- a/gcc/fortran/intrinsic.cc +++ b/gcc/fortran/intrinsic.cc @@ -19,6 +19,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/fortran/io.cc b/gcc/fortran/io.cc index ac4e5c56f45..5e1785e2dbd 100644 --- a/gcc/fortran/io.cc +++ b/gcc/fortran/io.cc @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/fortran/iresolve.cc b/gcc/fortran/iresolve.cc index 9fb22128492..d8b216bcc67 100644 --- a/gcc/fortran/iresolve.cc +++ b/gcc/fortran/iresolve.cc @@ -26,6 +26,7 @@ along with GCC; see the file COPYING3. If not see code node is passed. The result type and library subroutine name are generally set according to the function arguments. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/fortran/match.cc b/gcc/fortran/match.cc index 2b3ed4f4cf5..6e9da8c3e68 100644 --- a/gcc/fortran/match.cc +++ b/gcc/fortran/match.cc @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/fortran/matchexp.cc b/gcc/fortran/matchexp.cc index 9e773cf8fee..f7185d5aa4f 100644 --- a/gcc/fortran/matchexp.cc +++ b/gcc/fortran/matchexp.cc @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/fortran/misc.cc b/gcc/fortran/misc.cc index 991829516ef..0ef6679fee9 100644 --- a/gcc/fortran/misc.cc +++ b/gcc/fortran/misc.cc @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/fortran/module.cc b/gcc/fortran/module.cc index 880aef2c7a8..9ab4d2bf1ea 100644 --- a/gcc/fortran/module.cc +++ b/gcc/fortran/module.cc @@ -64,6 +64,7 @@ along with GCC; see the file COPYING3. If not see which are zero based. Symbols are written to the module in no particular order. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/fortran/openmp.cc b/gcc/fortran/openmp.cc index 7aa0d597444..aaede547d00 100644 --- a/gcc/fortran/openmp.cc +++ b/gcc/fortran/openmp.cc @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #define INCLUDE_VECTOR #define INCLUDE_STRING #include "config.h" diff --git a/gcc/fortran/options.cc b/gcc/fortran/options.cc index 0004df9278b..c531b898647 100644 --- a/gcc/fortran/options.cc +++ b/gcc/fortran/options.cc @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/fortran/parse.cc b/gcc/fortran/parse.cc index d2fe22d0edc..9d7d43aa5da 100644 --- a/gcc/fortran/parse.cc +++ b/gcc/fortran/parse.cc @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/fortran/primary.cc b/gcc/fortran/primary.cc index e57f631eff4..f3f659cf8df 100644 --- a/gcc/fortran/primary.cc +++ b/gcc/fortran/primary.cc @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/fortran/resolve.cc b/gcc/fortran/resolve.cc index c96523e4ad5..565d4aa5fe9 100644 --- a/gcc/fortran/resolve.cc +++ b/gcc/fortran/resolve.cc @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/fortran/scanner.cc b/gcc/fortran/scanner.cc index 09d7d8c5e39..7e3237cdd55 100644 --- a/gcc/fortran/scanner.cc +++ b/gcc/fortran/scanner.cc @@ -40,6 +40,7 @@ along with GCC; see the file COPYING3. If not see From the scanner's viewpoint, the higher level subroutines ask for new characters and do a lot of jumping backwards. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/fortran/simplify.cc b/gcc/fortran/simplify.cc index 2f6c3c39dad..1e2fa3eb8ea 100644 --- a/gcc/fortran/simplify.cc +++ b/gcc/fortran/simplify.cc @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/fortran/st.cc b/gcc/fortran/st.cc index 48e4258d10d..2ce61450c0d 100644 --- a/gcc/fortran/st.cc +++ b/gcc/fortran/st.cc @@ -23,6 +23,7 @@ along with GCC; see the file COPYING3. If not see GENERIC tree structures and from there to executable code for a target. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/fortran/symbol.cc b/gcc/fortran/symbol.cc index e803cdd93c9..5e83fb400e3 100644 --- a/gcc/fortran/symbol.cc +++ b/gcc/fortran/symbol.cc @@ -19,6 +19,7 @@ along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/fortran/target-memory.cc b/gcc/fortran/target-memory.cc index c71c4032090..235ecc49e39 100644 --- a/gcc/fortran/target-memory.cc +++ b/gcc/fortran/target-memory.cc @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/fortran/trans-array.cc b/gcc/fortran/trans-array.cc index ec7728cb11a..a52bde90bd2 100644 --- a/gcc/fortran/trans-array.cc +++ b/gcc/fortran/trans-array.cc @@ -75,6 +75,7 @@ along with GCC; see the file COPYING3. If not see After the loop code has been added into its parent scope gfc_cleanup_loop is called to free all the SS allocated by the scalarizer. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/fortran/trans-common.cc b/gcc/fortran/trans-common.cc index 49b0c3de471..7c3681a9308 100644 --- a/gcc/fortran/trans-common.cc +++ b/gcc/fortran/trans-common.cc @@ -94,6 +94,7 @@ along with GCC; see the file COPYING3. If not see #include "config.h" #define INCLUDE_MAP +#define INCLUDE_MEMORY #include "system.h" #include "coretypes.h" #include "tm.h" diff --git a/gcc/fortran/trans-const.cc b/gcc/fortran/trans-const.cc index 204f4df301c..9c2d683b1a1 100644 --- a/gcc/fortran/trans-const.cc +++ b/gcc/fortran/trans-const.cc @@ -20,6 +20,7 @@ along with GCC; see the file COPYING3. If not see /* trans-const.cc -- convert constant values */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/fortran/trans-decl.cc b/gcc/fortran/trans-decl.cc index a62fe3f0441..a2c15959551 100644 --- a/gcc/fortran/trans-decl.cc +++ b/gcc/fortran/trans-decl.cc @@ -20,6 +20,7 @@ along with GCC; see the file COPYING3. If not see /* trans-decl.cc -- Handling of backend function and variable decls, etc */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/fortran/trans-expr.cc b/gcc/fortran/trans-expr.cc index 16feff49527..663d762df88 100644 --- a/gcc/fortran/trans-expr.cc +++ b/gcc/fortran/trans-expr.cc @@ -21,6 +21,7 @@ along with GCC; see the file COPYING3. If not see /* trans-expr.cc-- generate GENERIC trees for gfc_expr. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/fortran/trans-intrinsic.cc b/gcc/fortran/trans-intrinsic.cc index 80d75f26b09..20ccbb123c6 100644 --- a/gcc/fortran/trans-intrinsic.cc +++ b/gcc/fortran/trans-intrinsic.cc @@ -21,6 +21,7 @@ along with GCC; see the file COPYING3. If not see /* trans-intrinsic.cc-- generate GENERIC trees for calls to intrinsics. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/fortran/trans-io.cc b/gcc/fortran/trans-io.cc index 961a711c530..41396a3fe4c 100644 --- a/gcc/fortran/trans-io.cc +++ b/gcc/fortran/trans-io.cc @@ -19,6 +19,7 @@ along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/fortran/trans-openmp.cc b/gcc/fortran/trans-openmp.cc index 5f7e29c2c64..279090f1c55 100644 --- a/gcc/fortran/trans-openmp.cc +++ b/gcc/fortran/trans-openmp.cc @@ -19,6 +19,7 @@ along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/fortran/trans-stmt.cc b/gcc/fortran/trans-stmt.cc index e1a84f22828..520ab505659 100644 --- a/gcc/fortran/trans-stmt.cc +++ b/gcc/fortran/trans-stmt.cc @@ -20,6 +20,7 @@ along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/fortran/trans-types.cc b/gcc/fortran/trans-types.cc index e596a362c02..2170869206e 100644 --- a/gcc/fortran/trans-types.cc +++ b/gcc/fortran/trans-types.cc @@ -21,6 +21,7 @@ along with GCC; see the file COPYING3. If not see /* trans-types.cc -- gfortran backend types */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/fortran/trans.cc b/gcc/fortran/trans.cc index 7182fa05598..58b93e233a1 100644 --- a/gcc/fortran/trans.cc +++ b/gcc/fortran/trans.cc @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/fwprop.cc b/gcc/fwprop.cc index 2ebb2f146cc..8cba6b7ce9f 100644 --- a/gcc/fwprop.cc +++ b/gcc/fwprop.cc @@ -20,6 +20,7 @@ along with GCC; see the file COPYING3. If not see #define INCLUDE_ALGORITHM #define INCLUDE_FUNCTIONAL +#define INCLUDE_MEMORY #define INCLUDE_ARRAY #include "config.h" #include "system.h" diff --git a/gcc/gcc-plugin.h b/gcc/gcc-plugin.h index 8eb33d6a8f5..683fc3ece3a 100644 --- a/gcc/gcc-plugin.h +++ b/gcc/gcc-plugin.h @@ -24,6 +24,7 @@ along with GCC; see the file COPYING3. If not see #define IN_GCC #endif +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/gcc-rich-location.cc b/gcc/gcc-rich-location.cc index 568744b39a3..0fa9db8e66d 100644 --- a/gcc/gcc-rich-location.cc +++ b/gcc/gcc-rich-location.cc @@ -17,6 +17,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/gcc-urlifier.cc b/gcc/gcc-urlifier.cc index be6459e8d7c..0db5429395e 100644 --- a/gcc/gcc-urlifier.cc +++ b/gcc/gcc-urlifier.cc @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" @@ -27,6 +28,7 @@ along with GCC; see the file COPYING3. If not see #include "opts.h" #include "options.h" #include "selftest.h" +#include "make-unique.h" namespace { @@ -213,10 +215,10 @@ gcc_urlifier::make_doc_url (const char *doc_url_suffix) } // anonymous namespace -urlifier * +std::unique_ptr make_gcc_urlifier (unsigned int lang_mask) { - return new gcc_urlifier (lang_mask); + return ::make_unique (lang_mask); } #if CHECKING_P diff --git a/gcc/gcc-urlifier.h b/gcc/gcc-urlifier.h index 660d4f8828e..c4cd03cc34a 100644 --- a/gcc/gcc-urlifier.h +++ b/gcc/gcc-urlifier.h @@ -21,6 +21,6 @@ along with GCC; see the file COPYING3. If not see #ifndef GCC_GCC_URLIFIER_H #define GCC_GCC_URLIFIER_H -extern urlifier *make_gcc_urlifier (unsigned int lang_mask); +extern std::unique_ptr make_gcc_urlifier (unsigned int lang_mask); #endif /* GCC_GCC_URLIFIER_H */ diff --git a/gcc/gcc.cc b/gcc/gcc.cc index 16fed46fb35..9998fd33343 100644 --- a/gcc/gcc.cc +++ b/gcc/gcc.cc @@ -27,6 +27,7 @@ CC recognizes how to compile each input file by suffixes in the file names. Once it knows which kind of compilation to perform, the procedure for compilation is specified by a string called a "spec". */ +#define INCLUDE_MEMORY #define INCLUDE_STRING #include "config.h" #include "system.h" @@ -41,6 +42,7 @@ compilation is specified by a string called a "spec". */ #include "gcc.h" #include "diagnostic.h" #include "diagnostic-format.h" +#include "pretty-print-urlifier.h" #include "flags.h" #include "opts.h" #include "filenames.h" diff --git a/gcc/gcov-dump.cc b/gcc/gcov-dump.cc index 731172f39ee..a511e37205c 100644 --- a/gcc/gcov-dump.cc +++ b/gcc/gcov-dump.cc @@ -17,6 +17,7 @@ along with Gcov; see the file COPYING3. If not see . */ #include "config.h" +#define INCLUDE_MEMORY #define INCLUDE_VECTOR #include "system.h" #include "coretypes.h" diff --git a/gcc/gcov-tool.cc b/gcc/gcov-tool.cc index 100f7357bcf..0f3c5c75110 100644 --- a/gcc/gcov-tool.cc +++ b/gcc/gcov-tool.cc @@ -23,6 +23,7 @@ a copy of the GCC Runtime Library Exception along with this program; see the files COPYING3 and COPYING.RUNTIME respectively. If not, see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/gengtype.cc b/gcc/gengtype.cc index c0ecbe8558b..4cd0974966d 100644 --- a/gcc/gengtype.cc +++ b/gcc/gengtype.cc @@ -1724,6 +1724,7 @@ open_base_files (void) outf_p gtype_desc_c; gtype_desc_c = create_file ("GCC", "gtype-desc.cc"); + oprintf (gtype_desc_c, "#define INCLUDE_MEMORY\n"); for (ifp = ifiles; *ifp; ifp++) oprintf (gtype_desc_c, "#include \"%s\"\n", *ifp); for (int j = 0; j < (int) num_build_headers; j++) diff --git a/gcc/genmatch.cc b/gcc/genmatch.cc index 6287d6a7bc2..317d02a2a4f 100644 --- a/gcc/genmatch.cc +++ b/gcc/genmatch.cc @@ -21,6 +21,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "bconfig.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/gimple-fold.cc b/gcc/gimple-fold.cc index d4ec7475990..00913bbbb11 100644 --- a/gcc/gimple-fold.cc +++ b/gcc/gimple-fold.cc @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/gimple-harden-conditionals.cc b/gcc/gimple-harden-conditionals.cc index 4ab086e1ab0..7bfa75a5bd6 100644 --- a/gcc/gimple-harden-conditionals.cc +++ b/gcc/gimple-harden-conditionals.cc @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/gimple-harden-control-flow.cc b/gcc/gimple-harden-control-flow.cc index 70383e6e265..f5654c3bb9f 100644 --- a/gcc/gimple-harden-control-flow.cc +++ b/gcc/gimple-harden-control-flow.cc @@ -20,6 +20,7 @@ along with GCC; see the file COPYING3. If not see #include "config.h" #define INCLUDE_ALGORITHM /* find */ +#define INCLUDE_MEMORY #include "system.h" #include "coretypes.h" #include "backend.h" diff --git a/gcc/gimple-if-to-switch.cc b/gcc/gimple-if-to-switch.cc index 96ce1c380a5..4246e12606f 100644 --- a/gcc/gimple-if-to-switch.cc +++ b/gcc/gimple-if-to-switch.cc @@ -28,6 +28,7 @@ along with GCC; see the file COPYING3. If not see d) We move all GIMPLE statements in the removed blocks into the first one. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/gimple-lower-bitint.cc b/gcc/gimple-lower-bitint.cc index 58deaf253e9..1d1e300643c 100644 --- a/gcc/gimple-lower-bitint.cc +++ b/gcc/gimple-lower-bitint.cc @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/gimple-predicate-analysis.cc b/gcc/gimple-predicate-analysis.cc index 01688b8581b..6b9043cc2dd 100644 --- a/gcc/gimple-predicate-analysis.cc +++ b/gcc/gimple-predicate-analysis.cc @@ -20,6 +20,7 @@ along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #define INCLUDE_STRING #include "config.h" #include "system.h" diff --git a/gcc/gimple-pretty-print.cc b/gcc/gimple-pretty-print.cc index 01d7c9f6eeb..30da3af36bd 100644 --- a/gcc/gimple-pretty-print.cc +++ b/gcc/gimple-pretty-print.cc @@ -19,6 +19,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/gimple-range-cache.cc b/gcc/gimple-range-cache.cc index 035076be5d8..4210841645c 100644 --- a/gcc/gimple-range-cache.cc +++ b/gcc/gimple-range-cache.cc @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/gimple-range-edge.cc b/gcc/gimple-range-edge.cc index 0c75ad0519c..6e082ffc9e8 100644 --- a/gcc/gimple-range-edge.cc +++ b/gcc/gimple-range-edge.cc @@ -20,6 +20,7 @@ along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/gimple-range-fold.cc b/gcc/gimple-range-fold.cc index dcd0cae0351..82dd363f2ec 100644 --- a/gcc/gimple-range-fold.cc +++ b/gcc/gimple-range-fold.cc @@ -19,6 +19,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/gimple-range-gori.cc b/gcc/gimple-range-gori.cc index f2e2b5049aa..f5103fd0e98 100644 --- a/gcc/gimple-range-gori.cc +++ b/gcc/gimple-range-gori.cc @@ -19,6 +19,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/gimple-range-infer.cc b/gcc/gimple-range-infer.cc index 98642e2438f..dd748248eaa 100644 --- a/gcc/gimple-range-infer.cc +++ b/gcc/gimple-range-infer.cc @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/gimple-range-op.cc b/gcc/gimple-range-op.cc index 68a7df8d01b..030030cb156 100644 --- a/gcc/gimple-range-op.cc +++ b/gcc/gimple-range-op.cc @@ -19,6 +19,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/gimple-range-path.cc b/gcc/gimple-range-path.cc index f64a7a5e8ca..85c3d15c903 100644 --- a/gcc/gimple-range-path.cc +++ b/gcc/gimple-range-path.cc @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/gimple-range-phi.cc b/gcc/gimple-range-phi.cc index c679e4ed7f2..aeb6c400ae9 100644 --- a/gcc/gimple-range-phi.cc +++ b/gcc/gimple-range-phi.cc @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/gimple-range-trace.cc b/gcc/gimple-range-trace.cc index e1679a1bfc9..5302646ed49 100644 --- a/gcc/gimple-range-trace.cc +++ b/gcc/gimple-range-trace.cc @@ -19,6 +19,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/gimple-range.cc b/gcc/gimple-range.cc index 7ba7d464b5e..e250b26281e 100644 --- a/gcc/gimple-range.cc +++ b/gcc/gimple-range.cc @@ -19,6 +19,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/gimple-ssa-backprop.cc b/gcc/gimple-ssa-backprop.cc index e3374b18138..ea3ae0bf043 100644 --- a/gcc/gimple-ssa-backprop.cc +++ b/gcc/gimple-ssa-backprop.cc @@ -84,6 +84,7 @@ along with GCC; see the file COPYING3. If not see Note that this pass does not deal with direct redundancies, such as cos(-x)->cos(x). match.pd handles those cases instead. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/gimple-ssa-sprintf.cc b/gcc/gimple-ssa-sprintf.cc index 0900710647c..2e06b9112f0 100644 --- a/gcc/gimple-ssa-sprintf.cc +++ b/gcc/gimple-ssa-sprintf.cc @@ -45,6 +45,7 @@ along with GCC; see the file COPYING3. If not see character arrays that a character pointer may point to as a bound on the longest string. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/gimple-ssa-store-merging.cc b/gcc/gimple-ssa-store-merging.cc index 7dba4a7a781..99103076945 100644 --- a/gcc/gimple-ssa-store-merging.cc +++ b/gcc/gimple-ssa-store-merging.cc @@ -138,6 +138,7 @@ [p] (32-bit) := 0x12345678; // (val & 0xffffffff0000) >> 16; [p + 4B] (16-bit) := 0xabcd; // val & 0x00000000ffff; */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/gimple-ssa-strength-reduction.cc b/gcc/gimple-ssa-strength-reduction.cc index 39cd9339c77..13e05b094de 100644 --- a/gcc/gimple-ssa-strength-reduction.cc +++ b/gcc/gimple-ssa-strength-reduction.cc @@ -33,6 +33,7 @@ along with GCC; see the file COPYING3. If not see If desired, it could be extended to floating-point operations under control of something like -funsafe-math-optimizations. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/gimple-ssa-warn-access.cc b/gcc/gimple-ssa-warn-access.cc index 5061af389c2..f2fea9101b5 100644 --- a/gcc/gimple-ssa-warn-access.cc +++ b/gcc/gimple-ssa-warn-access.cc @@ -20,6 +20,7 @@ along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #define INCLUDE_STRING #include "config.h" #include "system.h" diff --git a/gcc/gimple-ssa-warn-alloca.cc b/gcc/gimple-ssa-warn-alloca.cc index f12e55bc795..c85f5c77312 100644 --- a/gcc/gimple-ssa-warn-alloca.cc +++ b/gcc/gimple-ssa-warn-alloca.cc @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/gimple-ssa-warn-restrict.cc b/gcc/gimple-ssa-warn-restrict.cc index d71f1331c85..4bccca52f0d 100644 --- a/gcc/gimple-ssa-warn-restrict.cc +++ b/gcc/gimple-ssa-warn-restrict.cc @@ -19,6 +19,7 @@ along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/gimple-streamer-in.cc b/gcc/gimple-streamer-in.cc index 61f6d069875..d7843c5ecaa 100644 --- a/gcc/gimple-streamer-in.cc +++ b/gcc/gimple-streamer-in.cc @@ -19,6 +19,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/gimple-streamer-out.cc b/gcc/gimple-streamer-out.cc index e63d8b4df0c..f30f06ee720 100644 --- a/gcc/gimple-streamer-out.cc +++ b/gcc/gimple-streamer-out.cc @@ -19,6 +19,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/gimple.cc b/gcc/gimple.cc index 6e28cf291e1..13aa3d27844 100644 --- a/gcc/gimple.cc +++ b/gcc/gimple.cc @@ -19,6 +19,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/gimplify.cc b/gcc/gimplify.cc index 769b880cce5..9e7a1b5eb46 100644 --- a/gcc/gimplify.cc +++ b/gcc/gimplify.cc @@ -20,6 +20,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/go/go-backend.cc b/gcc/go/go-backend.cc index 25e5d35e6f1..69dbef66415 100644 --- a/gcc/go/go-backend.cc +++ b/gcc/go/go-backend.cc @@ -17,6 +17,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/go/go-lang.cc b/gcc/go/go-lang.cc index 9316425b2aa..42a21594f35 100644 --- a/gcc/go/go-lang.cc +++ b/gcc/go/go-lang.cc @@ -17,6 +17,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/graph.cc b/gcc/graph.cc index 07da0798f51..677dc50b61b 100644 --- a/gcc/graph.cc +++ b/gcc/graph.cc @@ -19,6 +19,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/graphviz.cc b/gcc/graphviz.cc index e41c8bc0ef3..daa97066953 100644 --- a/gcc/graphviz.cc +++ b/gcc/graphviz.cc @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/input.cc b/gcc/input.cc index 9f5228d255c..04462ef6f5a 100644 --- a/gcc/input.cc +++ b/gcc/input.cc @@ -17,6 +17,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/ipa-cp.cc b/gcc/ipa-cp.cc index fa7bd6a15da..212d9ccbbfe 100644 --- a/gcc/ipa-cp.cc +++ b/gcc/ipa-cp.cc @@ -101,6 +101,7 @@ along with GCC; see the file COPYING3. If not see the second stage. */ #define INCLUDE_ALGORITHM +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/ipa-devirt.cc b/gcc/ipa-devirt.cc index c406e5138db..9f06f597e91 100644 --- a/gcc/ipa-devirt.cc +++ b/gcc/ipa-devirt.cc @@ -105,6 +105,7 @@ along with GCC; see the file COPYING3. If not see pass_ipa_devirt performs simple speculative devirtualization. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/ipa-fnsummary.cc b/gcc/ipa-fnsummary.cc index b3824783406..42e3efc53b6 100644 --- a/gcc/ipa-fnsummary.cc +++ b/gcc/ipa-fnsummary.cc @@ -52,6 +52,7 @@ along with GCC; see the file COPYING3. If not see inlined performs analysis via its analyze_function method. */ #include "config.h" +#define INCLUDE_MEMORY #define INCLUDE_VECTOR #include "system.h" #include "coretypes.h" diff --git a/gcc/ipa-free-lang-data.cc b/gcc/ipa-free-lang-data.cc index 3ad203fec4c..80e30f58754 100644 --- a/gcc/ipa-free-lang-data.cc +++ b/gcc/ipa-free-lang-data.cc @@ -29,6 +29,7 @@ It is intended to be language-independent but can occasionally calls language-dependent routines. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/ipa-icf-gimple.cc b/gcc/ipa-icf-gimple.cc index 31f6cdbda06..73fc56557fe 100644 --- a/gcc/ipa-icf-gimple.cc +++ b/gcc/ipa-icf-gimple.cc @@ -19,6 +19,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/ipa-icf.cc b/gcc/ipa-icf.cc index b10a6baf109..fbb24186777 100644 --- a/gcc/ipa-icf.cc +++ b/gcc/ipa-icf.cc @@ -51,6 +51,7 @@ along with GCC; see the file COPYING3. If not see */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/ipa-inline-analysis.cc b/gcc/ipa-inline-analysis.cc index a190cb6501b..e52199872cf 100644 --- a/gcc/ipa-inline-analysis.cc +++ b/gcc/ipa-inline-analysis.cc @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/ipa-inline.cc b/gcc/ipa-inline.cc index f15e141aa52..74a0c86a5d0 100644 --- a/gcc/ipa-inline.cc +++ b/gcc/ipa-inline.cc @@ -89,6 +89,7 @@ along with GCC; see the file COPYING3. If not see This should almost always lead to reduction of code size by eliminating the need for offline copy of the function. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/ipa-modref-tree.cc b/gcc/ipa-modref-tree.cc index 961d46621a0..4bf7158535c 100644 --- a/gcc/ipa-modref-tree.cc +++ b/gcc/ipa-modref-tree.cc @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/ipa-modref.cc b/gcc/ipa-modref.cc index 19359662f8f..c1973aa36c4 100644 --- a/gcc/ipa-modref.cc +++ b/gcc/ipa-modref.cc @@ -53,6 +53,7 @@ along with GCC; see the file COPYING3. If not see That is a vector recording what function parameters may escape to a function call (and with what parameter index). */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/ipa-param-manipulation.cc b/gcc/ipa-param-manipulation.cc index ad36b8389c0..e1f6f3db299 100644 --- a/gcc/ipa-param-manipulation.cc +++ b/gcc/ipa-param-manipulation.cc @@ -19,6 +19,7 @@ along with GCC; see the file COPYING3. If not see . */ #define INCLUDE_ALGORITHM +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/ipa-polymorphic-call.cc b/gcc/ipa-polymorphic-call.cc index 7d3df7c474c..eb5f1e78456 100644 --- a/gcc/ipa-polymorphic-call.cc +++ b/gcc/ipa-polymorphic-call.cc @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/ipa-predicate.cc b/gcc/ipa-predicate.cc index 164aba4a126..fbe1d6d917d 100644 --- a/gcc/ipa-predicate.cc +++ b/gcc/ipa-predicate.cc @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/ipa-profile.cc b/gcc/ipa-profile.cc index 27f411ce81a..88e7523c0f2 100644 --- a/gcc/ipa-profile.cc +++ b/gcc/ipa-profile.cc @@ -37,6 +37,7 @@ along with GCC; see the file COPYING3. If not see once, executed at startup and executed at exit. These flags are used to control code size/performance threshold and code placement (by producing .text.unlikely/.text.hot/.text.startup/.text.exit subsections). */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/ipa-prop.cc b/gcc/ipa-prop.cc index 78d1fb7086d..e96ade34b34 100644 --- a/gcc/ipa-prop.cc +++ b/gcc/ipa-prop.cc @@ -17,6 +17,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/ipa-pure-const.cc b/gcc/ipa-pure-const.cc index b5a1dcdc154..79fde2449d2 100644 --- a/gcc/ipa-pure-const.cc +++ b/gcc/ipa-pure-const.cc @@ -31,6 +31,7 @@ along with GCC; see the file COPYING3. If not see should be one of the later passes since it's information is used by the rest of the compilation. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/ipa-reference.cc b/gcc/ipa-reference.cc index 4c8a362b57b..2930888e356 100644 --- a/gcc/ipa-reference.cc +++ b/gcc/ipa-reference.cc @@ -36,6 +36,7 @@ along with GCC; see the file COPYING3. If not see traumatic, promote some statics to registers, and improve aliasing information. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/ipa-split.cc b/gcc/ipa-split.cc index caf6279ab21..eb1f7937a0b 100644 --- a/gcc/ipa-split.cc +++ b/gcc/ipa-split.cc @@ -74,6 +74,7 @@ along with GCC; see the file COPYING3. If not see 7) There is nothing preventing us from producing multiple parts of single function when needed or splitting also the parts. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/ipa-sra.cc b/gcc/ipa-sra.cc index 04920f2aa8e..585ba53ce63 100644 --- a/gcc/ipa-sra.cc +++ b/gcc/ipa-sra.cc @@ -56,6 +56,7 @@ along with GCC; see the file COPYING3. If not see ipa-param-manipulation.h for more details. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/ipa-strub.cc b/gcc/ipa-strub.cc index 8fa7bdf5300..6dbef204de6 100644 --- a/gcc/ipa-strub.cc +++ b/gcc/ipa-strub.cc @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/ipa-utils.cc b/gcc/ipa-utils.cc index 2366fa778d1..38dd4704793 100644 --- a/gcc/ipa-utils.cc +++ b/gcc/ipa-utils.cc @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/jit/dummy-frontend.cc b/gcc/jit/dummy-frontend.cc index 17f37a3f405..12167829b27 100644 --- a/gcc/jit/dummy-frontend.cc +++ b/gcc/jit/dummy-frontend.cc @@ -17,6 +17,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/jit/jit-playback.cc b/gcc/jit/jit-playback.cc index 583956fb463..e732c228751 100644 --- a/gcc/jit/jit-playback.cc +++ b/gcc/jit/jit-playback.cc @@ -19,6 +19,7 @@ along with GCC; see the file COPYING3. If not see . */ #include "config.h" +#define INCLUDE_MEMORY #define INCLUDE_MUTEX #include "libgccjit.h" #include "system.h" diff --git a/gcc/jit/jit-recording.cc b/gcc/jit/jit-recording.cc index cc7f529c9e8..83a36db653d 100644 --- a/gcc/jit/jit-recording.cc +++ b/gcc/jit/jit-recording.cc @@ -19,6 +19,7 @@ along with GCC; see the file COPYING3. If not see . */ #include "config.h" +#define INCLUDE_MEMORY #define INCLUDE_SSTREAM #include "system.h" #include "coretypes.h" diff --git a/gcc/langhooks.cc b/gcc/langhooks.cc index 54fc94e4364..fe32be44956 100644 --- a/gcc/langhooks.cc +++ b/gcc/langhooks.cc @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/late-combine.cc b/gcc/late-combine.cc index 1d81b386c3d..1b6cd0bea2c 100644 --- a/gcc/late-combine.cc +++ b/gcc/late-combine.cc @@ -30,6 +30,7 @@ #define INCLUDE_ALGORITHM #define INCLUDE_FUNCTIONAL +#define INCLUDE_MEMORY #define INCLUDE_ARRAY #include "config.h" #include "system.h" diff --git a/gcc/lto-cgraph.cc b/gcc/lto-cgraph.cc index 1d4311a8832..e1d19f909dd 100644 --- a/gcc/lto-cgraph.cc +++ b/gcc/lto-cgraph.cc @@ -20,6 +20,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/lto-compress.cc b/gcc/lto-compress.cc index bebf0277ef6..1895bb43345 100644 --- a/gcc/lto-compress.cc +++ b/gcc/lto-compress.cc @@ -19,6 +19,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/lto-opts.cc b/gcc/lto-opts.cc index a3a1d110329..93ac83081f6 100644 --- a/gcc/lto-opts.cc +++ b/gcc/lto-opts.cc @@ -19,6 +19,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/lto-section-in.cc b/gcc/lto-section-in.cc index fc2ba1906e1..22c203b2262 100644 --- a/gcc/lto-section-in.cc +++ b/gcc/lto-section-in.cc @@ -19,6 +19,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/lto-section-out.cc b/gcc/lto-section-out.cc index d9c42653713..c05e97133b7 100644 --- a/gcc/lto-section-out.cc +++ b/gcc/lto-section-out.cc @@ -19,6 +19,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/lto-streamer-in.cc b/gcc/lto-streamer-in.cc index 15181c3f574..c541a0524c8 100644 --- a/gcc/lto-streamer-in.cc +++ b/gcc/lto-streamer-in.cc @@ -20,6 +20,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/lto-streamer-out.cc b/gcc/lto-streamer-out.cc index a464c2d5ddf..fab0702f99b 100644 --- a/gcc/lto-streamer-out.cc +++ b/gcc/lto-streamer-out.cc @@ -20,6 +20,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/lto-streamer.cc b/gcc/lto-streamer.cc index 40ca6b2da1b..884861d4dd1 100644 --- a/gcc/lto-streamer.cc +++ b/gcc/lto-streamer.cc @@ -20,6 +20,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/lto-wrapper.cc b/gcc/lto-wrapper.cc index 9d7fe18b229..a8bf847eb8c 100644 --- a/gcc/lto-wrapper.cc +++ b/gcc/lto-wrapper.cc @@ -37,6 +37,7 @@ along with GCC; see the file COPYING3. If not see ./ccCJuXGv.lto.ltrans.o */ +#define INCLUDE_MEMORY #define INCLUDE_STRING #include "config.h" #include "system.h" @@ -52,6 +53,7 @@ along with GCC; see the file COPYING3. If not see #include "opts-diagnostic.h" #include "opt-suggestions.h" #include "opts-jobserver.h" +#include "make-unique.h" /* Environment variable, used for passing the names of offload targets from GCC driver to lto-wrapper. */ @@ -2174,7 +2176,8 @@ main (int argc, char *argv[]) diagnostic_initialize (global_dc, 0); diagnostic_color_init (global_dc); diagnostic_urls_init (global_dc); - global_dc->set_option_manager (new lto_diagnostic_option_manager (), 0); + global_dc->set_option_manager + (::make_unique (), 0); if (atexit (lto_wrapper_cleanup) != 0) fatal_error (input_location, "% failed"); diff --git a/gcc/lto/lto-common.cc b/gcc/lto/lto-common.cc index 34aa63b179c..77607751db5 100644 --- a/gcc/lto/lto-common.cc +++ b/gcc/lto/lto-common.cc @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/lto/lto-dump.cc b/gcc/lto/lto-dump.cc index b570bccf8ed..be869c29431 100644 --- a/gcc/lto/lto-dump.cc +++ b/gcc/lto/lto-dump.cc @@ -17,6 +17,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/lto/lto-partition.cc b/gcc/lto/lto-partition.cc index 2238650fa0e..2267b4edaf4 100644 --- a/gcc/lto/lto-partition.cc +++ b/gcc/lto/lto-partition.cc @@ -18,6 +18,7 @@ along with GCC; see the file COPYING3. If not see . */ #include "config.h" +#define INCLUDE_MEMORY #define INCLUDE_VECTOR #include "system.h" #include "coretypes.h" diff --git a/gcc/lto/lto-symtab.cc b/gcc/lto/lto-symtab.cc index a40218beac5..b12937c6a0a 100644 --- a/gcc/lto/lto-symtab.cc +++ b/gcc/lto/lto-symtab.cc @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/lto/lto.cc b/gcc/lto/lto.cc index 1ee215d8f1d..e5b24f24370 100644 --- a/gcc/lto/lto.cc +++ b/gcc/lto/lto.cc @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #define INCLUDE_STRING #include "config.h" #include "system.h" diff --git a/gcc/m2/gm2-gcc/gcc-consolidation.h b/gcc/m2/gm2-gcc/gcc-consolidation.h index 637ec0bcc54..e0a94eeb279 100644 --- a/gcc/m2/gm2-gcc/gcc-consolidation.h +++ b/gcc/m2/gm2-gcc/gcc-consolidation.h @@ -19,6 +19,7 @@ You should have received a copy of the GNU General Public License along with GNU Modula-2; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/m2/gm2-gcc/m2configure.cc b/gcc/m2/gm2-gcc/m2configure.cc index 9e0e82f86c0..d55d6c25e8f 100644 --- a/gcc/m2/gm2-gcc/m2configure.cc +++ b/gcc/m2/gm2-gcc/m2configure.cc @@ -19,6 +19,7 @@ You should have received a copy of the GNU General Public License along with GNU Modula-2; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "libiberty.h" diff --git a/gcc/m2/mc-boot/GASCII.cc b/gcc/m2/mc-boot/GASCII.cc index a5c59fd3c4b..76e1dd901ed 100644 --- a/gcc/m2/mc-boot/GASCII.cc +++ b/gcc/m2/mc-boot/GASCII.cc @@ -25,6 +25,7 @@ a copy of the GCC Runtime Library Exception along with this program; see the files COPYING3 and COPYING.RUNTIME respectively. If not, see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include diff --git a/gcc/m2/mc-boot/GASCII.h b/gcc/m2/mc-boot/GASCII.h index c157a8b7686..76c961a9d57 100644 --- a/gcc/m2/mc-boot/GASCII.h +++ b/gcc/m2/mc-boot/GASCII.h @@ -29,6 +29,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_ASCII_H) # define _ASCII_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GArgs.cc b/gcc/m2/mc-boot/GArgs.cc index 182def800ea..8fc16a4ebea 100644 --- a/gcc/m2/mc-boot/GArgs.cc +++ b/gcc/m2/mc-boot/GArgs.cc @@ -25,6 +25,7 @@ a copy of the GCC Runtime Library Exception along with this program; see the files COPYING3 and COPYING.RUNTIME respectively. If not, see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include diff --git a/gcc/m2/mc-boot/GArgs.h b/gcc/m2/mc-boot/GArgs.h index 1171cef8d72..752345f691c 100644 --- a/gcc/m2/mc-boot/GArgs.h +++ b/gcc/m2/mc-boot/GArgs.h @@ -29,6 +29,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_Args_H) # define _Args_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GAssertion.cc b/gcc/m2/mc-boot/GAssertion.cc index b6b47952108..34989b9737f 100644 --- a/gcc/m2/mc-boot/GAssertion.cc +++ b/gcc/m2/mc-boot/GAssertion.cc @@ -25,6 +25,7 @@ a copy of the GCC Runtime Library Exception along with this program; see the files COPYING3 and COPYING.RUNTIME respectively. If not, see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include diff --git a/gcc/m2/mc-boot/GAssertion.h b/gcc/m2/mc-boot/GAssertion.h index d909fdee7a3..c5bcdd98d37 100644 --- a/gcc/m2/mc-boot/GAssertion.h +++ b/gcc/m2/mc-boot/GAssertion.h @@ -29,6 +29,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_Assertion_H) # define _Assertion_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GBreak.cc b/gcc/m2/mc-boot/GBreak.cc index 4fea839214b..ffbe2f172a5 100644 --- a/gcc/m2/mc-boot/GBreak.cc +++ b/gcc/m2/mc-boot/GBreak.cc @@ -25,6 +25,7 @@ a copy of the GCC Runtime Library Exception along with this program; see the files COPYING3 and COPYING.RUNTIME respectively. If not, see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include diff --git a/gcc/m2/mc-boot/GBreak.h b/gcc/m2/mc-boot/GBreak.h index bd2f1ccf6f1..df0ee16b5ed 100644 --- a/gcc/m2/mc-boot/GBreak.h +++ b/gcc/m2/mc-boot/GBreak.h @@ -29,6 +29,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_Break_H) # define _Break_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GCOROUTINES.h b/gcc/m2/mc-boot/GCOROUTINES.h index a744d9c6ebe..dff08a0c185 100644 --- a/gcc/m2/mc-boot/GCOROUTINES.h +++ b/gcc/m2/mc-boot/GCOROUTINES.h @@ -29,6 +29,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_COROUTINES_H) # define _COROUTINES_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GCmdArgs.cc b/gcc/m2/mc-boot/GCmdArgs.cc index cb8fa8ace58..0e33d916051 100644 --- a/gcc/m2/mc-boot/GCmdArgs.cc +++ b/gcc/m2/mc-boot/GCmdArgs.cc @@ -25,6 +25,7 @@ a copy of the GCC Runtime Library Exception along with this program; see the files COPYING3 and COPYING.RUNTIME respectively. If not, see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include diff --git a/gcc/m2/mc-boot/GCmdArgs.h b/gcc/m2/mc-boot/GCmdArgs.h index 7f39815bc09..852e8dc0037 100644 --- a/gcc/m2/mc-boot/GCmdArgs.h +++ b/gcc/m2/mc-boot/GCmdArgs.h @@ -29,6 +29,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_CmdArgs_H) # define _CmdArgs_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GDebug.cc b/gcc/m2/mc-boot/GDebug.cc index 3f0ec51507e..edda6c952c5 100644 --- a/gcc/m2/mc-boot/GDebug.cc +++ b/gcc/m2/mc-boot/GDebug.cc @@ -25,6 +25,7 @@ a copy of the GCC Runtime Library Exception along with this program; see the files COPYING3 and COPYING.RUNTIME respectively. If not, see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include diff --git a/gcc/m2/mc-boot/GDebug.h b/gcc/m2/mc-boot/GDebug.h index 8787752b9a3..08c4da1abed 100644 --- a/gcc/m2/mc-boot/GDebug.h +++ b/gcc/m2/mc-boot/GDebug.h @@ -29,6 +29,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_Debug_H) # define _Debug_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GDynamicStrings.cc b/gcc/m2/mc-boot/GDynamicStrings.cc index 2b182b9b2c0..bccbeda2f23 100644 --- a/gcc/m2/mc-boot/GDynamicStrings.cc +++ b/gcc/m2/mc-boot/GDynamicStrings.cc @@ -25,6 +25,7 @@ a copy of the GCC Runtime Library Exception along with this program; see the files COPYING3 and COPYING.RUNTIME respectively. If not, see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include diff --git a/gcc/m2/mc-boot/GDynamicStrings.h b/gcc/m2/mc-boot/GDynamicStrings.h index e0652a7d3bd..fefce9d6f6b 100644 --- a/gcc/m2/mc-boot/GDynamicStrings.h +++ b/gcc/m2/mc-boot/GDynamicStrings.h @@ -29,6 +29,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_DynamicStrings_H) # define _DynamicStrings_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GEnvironment.cc b/gcc/m2/mc-boot/GEnvironment.cc index aad1bb46c01..95dab816595 100644 --- a/gcc/m2/mc-boot/GEnvironment.cc +++ b/gcc/m2/mc-boot/GEnvironment.cc @@ -25,6 +25,7 @@ a copy of the GCC Runtime Library Exception along with this program; see the files COPYING3 and COPYING.RUNTIME respectively. If not, see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include diff --git a/gcc/m2/mc-boot/GEnvironment.h b/gcc/m2/mc-boot/GEnvironment.h index 4f94d583334..2da03aeba75 100644 --- a/gcc/m2/mc-boot/GEnvironment.h +++ b/gcc/m2/mc-boot/GEnvironment.h @@ -29,6 +29,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_Environment_H) # define _Environment_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GFIO.cc b/gcc/m2/mc-boot/GFIO.cc index b05c33000bd..45a39d66116 100644 --- a/gcc/m2/mc-boot/GFIO.cc +++ b/gcc/m2/mc-boot/GFIO.cc @@ -25,6 +25,7 @@ a copy of the GCC Runtime Library Exception along with this program; see the files COPYING3 and COPYING.RUNTIME respectively. If not, see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include diff --git a/gcc/m2/mc-boot/GFIO.h b/gcc/m2/mc-boot/GFIO.h index d82396449ff..04cbc768505 100644 --- a/gcc/m2/mc-boot/GFIO.h +++ b/gcc/m2/mc-boot/GFIO.h @@ -29,6 +29,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_FIO_H) # define _FIO_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GFormatStrings.cc b/gcc/m2/mc-boot/GFormatStrings.cc index d3acec3bc6c..36998f693c5 100644 --- a/gcc/m2/mc-boot/GFormatStrings.cc +++ b/gcc/m2/mc-boot/GFormatStrings.cc @@ -25,6 +25,7 @@ a copy of the GCC Runtime Library Exception along with this program; see the files COPYING3 and COPYING.RUNTIME respectively. If not, see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include diff --git a/gcc/m2/mc-boot/GFormatStrings.h b/gcc/m2/mc-boot/GFormatStrings.h index 1d8ce34ce62..858403d5690 100644 --- a/gcc/m2/mc-boot/GFormatStrings.h +++ b/gcc/m2/mc-boot/GFormatStrings.h @@ -29,6 +29,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_FormatStrings_H) # define _FormatStrings_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GFpuIO.cc b/gcc/m2/mc-boot/GFpuIO.cc index 09fd4fb95cd..3c4fb6121dc 100644 --- a/gcc/m2/mc-boot/GFpuIO.cc +++ b/gcc/m2/mc-boot/GFpuIO.cc @@ -25,6 +25,7 @@ a copy of the GCC Runtime Library Exception along with this program; see the files COPYING3 and COPYING.RUNTIME respectively. If not, see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include diff --git a/gcc/m2/mc-boot/GFpuIO.h b/gcc/m2/mc-boot/GFpuIO.h index 5d830606130..1e0575b7f82 100644 --- a/gcc/m2/mc-boot/GFpuIO.h +++ b/gcc/m2/mc-boot/GFpuIO.h @@ -29,6 +29,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_FpuIO_H) # define _FpuIO_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GIO.cc b/gcc/m2/mc-boot/GIO.cc index 4b76ed6bc80..76495e745fd 100644 --- a/gcc/m2/mc-boot/GIO.cc +++ b/gcc/m2/mc-boot/GIO.cc @@ -25,6 +25,7 @@ a copy of the GCC Runtime Library Exception along with this program; see the files COPYING3 and COPYING.RUNTIME respectively. If not, see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include diff --git a/gcc/m2/mc-boot/GIO.h b/gcc/m2/mc-boot/GIO.h index 4f4af9a59a0..3e58ea5cff2 100644 --- a/gcc/m2/mc-boot/GIO.h +++ b/gcc/m2/mc-boot/GIO.h @@ -29,6 +29,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_IO_H) # define _IO_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GIndexing.cc b/gcc/m2/mc-boot/GIndexing.cc index dd314001108..4dfccd2f991 100644 --- a/gcc/m2/mc-boot/GIndexing.cc +++ b/gcc/m2/mc-boot/GIndexing.cc @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include diff --git a/gcc/m2/mc-boot/GIndexing.h b/gcc/m2/mc-boot/GIndexing.h index b986469c331..e2e728c2566 100644 --- a/gcc/m2/mc-boot/GIndexing.h +++ b/gcc/m2/mc-boot/GIndexing.h @@ -24,6 +24,7 @@ along with GNU Modula-2; see the file COPYING3. If not see #if !defined (_Indexing_H) # define _Indexing_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GM2Dependent.cc b/gcc/m2/mc-boot/GM2Dependent.cc index c965f4bf7f3..f4fe04cd2b6 100644 --- a/gcc/m2/mc-boot/GM2Dependent.cc +++ b/gcc/m2/mc-boot/GM2Dependent.cc @@ -25,6 +25,7 @@ a copy of the GCC Runtime Library Exception along with this program; see the files COPYING3 and COPYING.RUNTIME respectively. If not, see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include diff --git a/gcc/m2/mc-boot/GM2Dependent.h b/gcc/m2/mc-boot/GM2Dependent.h index 0353236f8c1..3b32e165a48 100644 --- a/gcc/m2/mc-boot/GM2Dependent.h +++ b/gcc/m2/mc-boot/GM2Dependent.h @@ -29,6 +29,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_M2Dependent_H) # define _M2Dependent_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GM2EXCEPTION.cc b/gcc/m2/mc-boot/GM2EXCEPTION.cc index 97417cf6c82..af1218f922a 100644 --- a/gcc/m2/mc-boot/GM2EXCEPTION.cc +++ b/gcc/m2/mc-boot/GM2EXCEPTION.cc @@ -25,6 +25,7 @@ a copy of the GCC Runtime Library Exception along with this program; see the files COPYING3 and COPYING.RUNTIME respectively. If not, see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include diff --git a/gcc/m2/mc-boot/GM2EXCEPTION.h b/gcc/m2/mc-boot/GM2EXCEPTION.h index 4ee5404733c..fef5e2b1740 100644 --- a/gcc/m2/mc-boot/GM2EXCEPTION.h +++ b/gcc/m2/mc-boot/GM2EXCEPTION.h @@ -29,6 +29,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_M2EXCEPTION_H) # define _M2EXCEPTION_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GM2RTS.cc b/gcc/m2/mc-boot/GM2RTS.cc index ef5f7cf5ce1..844006ac529 100644 --- a/gcc/m2/mc-boot/GM2RTS.cc +++ b/gcc/m2/mc-boot/GM2RTS.cc @@ -25,6 +25,7 @@ a copy of the GCC Runtime Library Exception along with this program; see the files COPYING3 and COPYING.RUNTIME respectively. If not, see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include diff --git a/gcc/m2/mc-boot/GM2RTS.h b/gcc/m2/mc-boot/GM2RTS.h index 055cc95675b..88e21849c05 100644 --- a/gcc/m2/mc-boot/GM2RTS.h +++ b/gcc/m2/mc-boot/GM2RTS.h @@ -29,6 +29,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_M2RTS_H) # define _M2RTS_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GMemUtils.cc b/gcc/m2/mc-boot/GMemUtils.cc index 1d9feed27d6..04474ecbf39 100644 --- a/gcc/m2/mc-boot/GMemUtils.cc +++ b/gcc/m2/mc-boot/GMemUtils.cc @@ -25,6 +25,7 @@ a copy of the GCC Runtime Library Exception along with this program; see the files COPYING3 and COPYING.RUNTIME respectively. If not, see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include diff --git a/gcc/m2/mc-boot/GMemUtils.h b/gcc/m2/mc-boot/GMemUtils.h index 1d23091ce93..dea7aafda6d 100644 --- a/gcc/m2/mc-boot/GMemUtils.h +++ b/gcc/m2/mc-boot/GMemUtils.h @@ -29,6 +29,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_MemUtils_H) # define _MemUtils_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GNumberIO.cc b/gcc/m2/mc-boot/GNumberIO.cc index 75720dd85e6..15b3be191f0 100644 --- a/gcc/m2/mc-boot/GNumberIO.cc +++ b/gcc/m2/mc-boot/GNumberIO.cc @@ -25,6 +25,7 @@ a copy of the GCC Runtime Library Exception along with this program; see the files COPYING3 and COPYING.RUNTIME respectively. If not, see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include diff --git a/gcc/m2/mc-boot/GNumberIO.h b/gcc/m2/mc-boot/GNumberIO.h index 34aee337383..decd31b4dd8 100644 --- a/gcc/m2/mc-boot/GNumberIO.h +++ b/gcc/m2/mc-boot/GNumberIO.h @@ -29,6 +29,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_NumberIO_H) # define _NumberIO_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GPushBackInput.cc b/gcc/m2/mc-boot/GPushBackInput.cc index 9bc2a83abd4..5c50f967c18 100644 --- a/gcc/m2/mc-boot/GPushBackInput.cc +++ b/gcc/m2/mc-boot/GPushBackInput.cc @@ -25,6 +25,7 @@ a copy of the GCC Runtime Library Exception along with this program; see the files COPYING3 and COPYING.RUNTIME respectively. If not, see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include diff --git a/gcc/m2/mc-boot/GPushBackInput.h b/gcc/m2/mc-boot/GPushBackInput.h index 076b99657a0..27c572b53e0 100644 --- a/gcc/m2/mc-boot/GPushBackInput.h +++ b/gcc/m2/mc-boot/GPushBackInput.h @@ -29,6 +29,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_PushBackInput_H) # define _PushBackInput_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GRTExceptions.cc b/gcc/m2/mc-boot/GRTExceptions.cc index a0eff3ecc8a..d42c1f31107 100644 --- a/gcc/m2/mc-boot/GRTExceptions.cc +++ b/gcc/m2/mc-boot/GRTExceptions.cc @@ -25,6 +25,7 @@ a copy of the GCC Runtime Library Exception along with this program; see the files COPYING3 and COPYING.RUNTIME respectively. If not, see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include diff --git a/gcc/m2/mc-boot/GRTExceptions.h b/gcc/m2/mc-boot/GRTExceptions.h index 9e188bcbad4..b335d800ca6 100644 --- a/gcc/m2/mc-boot/GRTExceptions.h +++ b/gcc/m2/mc-boot/GRTExceptions.h @@ -29,6 +29,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_RTExceptions_H) # define _RTExceptions_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GRTco.h b/gcc/m2/mc-boot/GRTco.h index 778b75f3d2e..2e014d333cf 100644 --- a/gcc/m2/mc-boot/GRTco.h +++ b/gcc/m2/mc-boot/GRTco.h @@ -29,6 +29,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_RTco_H) # define _RTco_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GRTentity.h b/gcc/m2/mc-boot/GRTentity.h index 9acb0775575..3eb8822fc9d 100644 --- a/gcc/m2/mc-boot/GRTentity.h +++ b/gcc/m2/mc-boot/GRTentity.h @@ -29,6 +29,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_RTentity_H) # define _RTentity_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GRTint.cc b/gcc/m2/mc-boot/GRTint.cc index 11b4228074a..f1c268843c8 100644 --- a/gcc/m2/mc-boot/GRTint.cc +++ b/gcc/m2/mc-boot/GRTint.cc @@ -25,6 +25,7 @@ a copy of the GCC Runtime Library Exception along with this program; see the files COPYING3 and COPYING.RUNTIME respectively. If not, see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include diff --git a/gcc/m2/mc-boot/GRTint.h b/gcc/m2/mc-boot/GRTint.h index 4f81546e8d6..a9fb9d182ec 100644 --- a/gcc/m2/mc-boot/GRTint.h +++ b/gcc/m2/mc-boot/GRTint.h @@ -29,6 +29,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_RTint_H) # define _RTint_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GSArgs.cc b/gcc/m2/mc-boot/GSArgs.cc index 93083a056dc..0c99f2d2594 100644 --- a/gcc/m2/mc-boot/GSArgs.cc +++ b/gcc/m2/mc-boot/GSArgs.cc @@ -25,6 +25,7 @@ a copy of the GCC Runtime Library Exception along with this program; see the files COPYING3 and COPYING.RUNTIME respectively. If not, see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include diff --git a/gcc/m2/mc-boot/GSArgs.h b/gcc/m2/mc-boot/GSArgs.h index a7b10bf4a1f..6a12e7ec4f3 100644 --- a/gcc/m2/mc-boot/GSArgs.h +++ b/gcc/m2/mc-boot/GSArgs.h @@ -29,6 +29,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_SArgs_H) # define _SArgs_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GSFIO.cc b/gcc/m2/mc-boot/GSFIO.cc index b568cce23eb..232d3f5883e 100644 --- a/gcc/m2/mc-boot/GSFIO.cc +++ b/gcc/m2/mc-boot/GSFIO.cc @@ -25,6 +25,7 @@ a copy of the GCC Runtime Library Exception along with this program; see the files COPYING3 and COPYING.RUNTIME respectively. If not, see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include diff --git a/gcc/m2/mc-boot/GSFIO.h b/gcc/m2/mc-boot/GSFIO.h index 108d8ea79f0..bba25eb8436 100644 --- a/gcc/m2/mc-boot/GSFIO.h +++ b/gcc/m2/mc-boot/GSFIO.h @@ -29,6 +29,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_SFIO_H) # define _SFIO_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GSYSTEM.h b/gcc/m2/mc-boot/GSYSTEM.h index a18a1765dc5..ff4b7b24ac3 100644 --- a/gcc/m2/mc-boot/GSYSTEM.h +++ b/gcc/m2/mc-boot/GSYSTEM.h @@ -29,6 +29,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_SYSTEM_H) # define _SYSTEM_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GSelective.h b/gcc/m2/mc-boot/GSelective.h index 67b7f0643f0..17e926d1a44 100644 --- a/gcc/m2/mc-boot/GSelective.h +++ b/gcc/m2/mc-boot/GSelective.h @@ -29,6 +29,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_Selective_H) # define _Selective_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GStdIO.cc b/gcc/m2/mc-boot/GStdIO.cc index c9d3774ec06..ddcb8ec040a 100644 --- a/gcc/m2/mc-boot/GStdIO.cc +++ b/gcc/m2/mc-boot/GStdIO.cc @@ -25,6 +25,7 @@ a copy of the GCC Runtime Library Exception along with this program; see the files COPYING3 and COPYING.RUNTIME respectively. If not, see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include diff --git a/gcc/m2/mc-boot/GStdIO.h b/gcc/m2/mc-boot/GStdIO.h index 0a45ebc7e34..3c84cede87b 100644 --- a/gcc/m2/mc-boot/GStdIO.h +++ b/gcc/m2/mc-boot/GStdIO.h @@ -29,6 +29,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_StdIO_H) # define _StdIO_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GStorage.cc b/gcc/m2/mc-boot/GStorage.cc index 67e7a8b7274..24ced14ce6a 100644 --- a/gcc/m2/mc-boot/GStorage.cc +++ b/gcc/m2/mc-boot/GStorage.cc @@ -25,6 +25,7 @@ a copy of the GCC Runtime Library Exception along with this program; see the files COPYING3 and COPYING.RUNTIME respectively. If not, see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include diff --git a/gcc/m2/mc-boot/GStorage.h b/gcc/m2/mc-boot/GStorage.h index 8c26b465b2c..a119a8f6e58 100644 --- a/gcc/m2/mc-boot/GStorage.h +++ b/gcc/m2/mc-boot/GStorage.h @@ -29,6 +29,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_Storage_H) # define _Storage_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GStrCase.cc b/gcc/m2/mc-boot/GStrCase.cc index 9492774596b..03993e5fbd6 100644 --- a/gcc/m2/mc-boot/GStrCase.cc +++ b/gcc/m2/mc-boot/GStrCase.cc @@ -25,6 +25,7 @@ a copy of the GCC Runtime Library Exception along with this program; see the files COPYING3 and COPYING.RUNTIME respectively. If not, see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include diff --git a/gcc/m2/mc-boot/GStrCase.h b/gcc/m2/mc-boot/GStrCase.h index c3f064728d8..9fd23285525 100644 --- a/gcc/m2/mc-boot/GStrCase.h +++ b/gcc/m2/mc-boot/GStrCase.h @@ -29,6 +29,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_StrCase_H) # define _StrCase_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GStrIO.cc b/gcc/m2/mc-boot/GStrIO.cc index d0c6e2085cd..7e94ef521ea 100644 --- a/gcc/m2/mc-boot/GStrIO.cc +++ b/gcc/m2/mc-boot/GStrIO.cc @@ -25,6 +25,7 @@ a copy of the GCC Runtime Library Exception along with this program; see the files COPYING3 and COPYING.RUNTIME respectively. If not, see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include diff --git a/gcc/m2/mc-boot/GStrIO.h b/gcc/m2/mc-boot/GStrIO.h index 2ed2ac33f11..653e020d399 100644 --- a/gcc/m2/mc-boot/GStrIO.h +++ b/gcc/m2/mc-boot/GStrIO.h @@ -29,6 +29,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_StrIO_H) # define _StrIO_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GStrLib.cc b/gcc/m2/mc-boot/GStrLib.cc index dc6d0ff2aa0..19ac230e9a4 100644 --- a/gcc/m2/mc-boot/GStrLib.cc +++ b/gcc/m2/mc-boot/GStrLib.cc @@ -25,6 +25,7 @@ a copy of the GCC Runtime Library Exception along with this program; see the files COPYING3 and COPYING.RUNTIME respectively. If not, see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include diff --git a/gcc/m2/mc-boot/GStrLib.h b/gcc/m2/mc-boot/GStrLib.h index b292d8990a1..ddd7457a6ff 100644 --- a/gcc/m2/mc-boot/GStrLib.h +++ b/gcc/m2/mc-boot/GStrLib.h @@ -29,6 +29,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_StrLib_H) # define _StrLib_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GStringConvert.cc b/gcc/m2/mc-boot/GStringConvert.cc index 80efd0c9fc4..822813cd141 100644 --- a/gcc/m2/mc-boot/GStringConvert.cc +++ b/gcc/m2/mc-boot/GStringConvert.cc @@ -25,6 +25,7 @@ a copy of the GCC Runtime Library Exception along with this program; see the files COPYING3 and COPYING.RUNTIME respectively. If not, see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include diff --git a/gcc/m2/mc-boot/GStringConvert.h b/gcc/m2/mc-boot/GStringConvert.h index 284eef236cc..3983d6cc375 100644 --- a/gcc/m2/mc-boot/GStringConvert.h +++ b/gcc/m2/mc-boot/GStringConvert.h @@ -29,6 +29,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_StringConvert_H) # define _StringConvert_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GSysExceptions.h b/gcc/m2/mc-boot/GSysExceptions.h index 00dd52117d1..eee2631c8be 100644 --- a/gcc/m2/mc-boot/GSysExceptions.h +++ b/gcc/m2/mc-boot/GSysExceptions.h @@ -29,6 +29,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_SysExceptions_H) # define _SysExceptions_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GSysStorage.cc b/gcc/m2/mc-boot/GSysStorage.cc index 1ef723074d4..fe06a5d8775 100644 --- a/gcc/m2/mc-boot/GSysStorage.cc +++ b/gcc/m2/mc-boot/GSysStorage.cc @@ -25,6 +25,7 @@ a copy of the GCC Runtime Library Exception along with this program; see the files COPYING3 and COPYING.RUNTIME respectively. If not, see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include diff --git a/gcc/m2/mc-boot/GSysStorage.h b/gcc/m2/mc-boot/GSysStorage.h index 639f6811e19..2aa6f85aaff 100644 --- a/gcc/m2/mc-boot/GSysStorage.h +++ b/gcc/m2/mc-boot/GSysStorage.h @@ -29,6 +29,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_SysStorage_H) # define _SysStorage_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GTimeString.cc b/gcc/m2/mc-boot/GTimeString.cc index af7b7e40814..37405659be0 100644 --- a/gcc/m2/mc-boot/GTimeString.cc +++ b/gcc/m2/mc-boot/GTimeString.cc @@ -25,6 +25,7 @@ a copy of the GCC Runtime Library Exception along with this program; see the files COPYING3 and COPYING.RUNTIME respectively. If not, see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include diff --git a/gcc/m2/mc-boot/GTimeString.h b/gcc/m2/mc-boot/GTimeString.h index 7ba51f8081e..27d128769f5 100644 --- a/gcc/m2/mc-boot/GTimeString.h +++ b/gcc/m2/mc-boot/GTimeString.h @@ -29,6 +29,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_TimeString_H) # define _TimeString_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GUnixArgs.h b/gcc/m2/mc-boot/GUnixArgs.h index cf9756ea177..6c04a944825 100644 --- a/gcc/m2/mc-boot/GUnixArgs.h +++ b/gcc/m2/mc-boot/GUnixArgs.h @@ -29,6 +29,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_UnixArgs_H) # define _UnixArgs_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/Galists.cc b/gcc/m2/mc-boot/Galists.cc index ca582f3ce43..a2ad92238b7 100644 --- a/gcc/m2/mc-boot/Galists.cc +++ b/gcc/m2/mc-boot/Galists.cc @@ -20,6 +20,7 @@ You should have received a copy of the GNU General Public License along with GNU Modula-2; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include diff --git a/gcc/m2/mc-boot/Galists.h b/gcc/m2/mc-boot/Galists.h index 3ed524152f4..3bb6599422c 100644 --- a/gcc/m2/mc-boot/Galists.h +++ b/gcc/m2/mc-boot/Galists.h @@ -24,6 +24,7 @@ along with GNU Modula-2; see the file COPYING3. If not see #if !defined (_alists_H) # define _alists_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/Gdecl.cc b/gcc/m2/mc-boot/Gdecl.cc index 9af2842ca18..0878f7de29b 100644 --- a/gcc/m2/mc-boot/Gdecl.cc +++ b/gcc/m2/mc-boot/Gdecl.cc @@ -20,6 +20,7 @@ You should have received a copy of the GNU General Public License along with GNU Modula-2; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include diff --git a/gcc/m2/mc-boot/Gdecl.h b/gcc/m2/mc-boot/Gdecl.h index 99d78087ae2..8b7aa91b38a 100644 --- a/gcc/m2/mc-boot/Gdecl.h +++ b/gcc/m2/mc-boot/Gdecl.h @@ -24,6 +24,7 @@ along with GNU Modula-2; see the file COPYING3. If not see #if !defined (_decl_H) # define _decl_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/Gdtoa.h b/gcc/m2/mc-boot/Gdtoa.h index c1b3619ce47..d06a03480f9 100644 --- a/gcc/m2/mc-boot/Gdtoa.h +++ b/gcc/m2/mc-boot/Gdtoa.h @@ -29,6 +29,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_dtoa_H) # define _dtoa_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/Gerrno.h b/gcc/m2/mc-boot/Gerrno.h index 7f065ccb24d..9d315c3d2ce 100644 --- a/gcc/m2/mc-boot/Gerrno.h +++ b/gcc/m2/mc-boot/Gerrno.h @@ -29,6 +29,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_errno_H) # define _errno_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/Gkeyc.cc b/gcc/m2/mc-boot/Gkeyc.cc index 3a5dd5ccc1d..a56abc56ee3 100644 --- a/gcc/m2/mc-boot/Gkeyc.cc +++ b/gcc/m2/mc-boot/Gkeyc.cc @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include @@ -575,6 +576,7 @@ static void checkGccConfigSystem (mcPretty_pretty p) if (! initializedGCC) { initializedGCC = true; + mcPretty_print (p, (const char *) "#define INCLUDE_MEMORY\\n", 24); mcPretty_print (p, (const char *) "#include \"config.h\"\\n", 21); mcPretty_print (p, (const char *) "#include \"system.h\"\\n", 21); checkGccTypes (p); diff --git a/gcc/m2/mc-boot/Gkeyc.h b/gcc/m2/mc-boot/Gkeyc.h index afa945d03c0..f0911ee8488 100644 --- a/gcc/m2/mc-boot/Gkeyc.h +++ b/gcc/m2/mc-boot/Gkeyc.h @@ -24,6 +24,7 @@ along with GNU Modula-2; see the file COPYING3. If not see #if !defined (_keyc_H) # define _keyc_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/Gldtoa.h b/gcc/m2/mc-boot/Gldtoa.h index c4b4d904fb0..a8f72ea4bd1 100644 --- a/gcc/m2/mc-boot/Gldtoa.h +++ b/gcc/m2/mc-boot/Gldtoa.h @@ -29,6 +29,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_ldtoa_H) # define _ldtoa_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/Glibc.h b/gcc/m2/mc-boot/Glibc.h index def419fb3c9..50384ecf897 100644 --- a/gcc/m2/mc-boot/Glibc.h +++ b/gcc/m2/mc-boot/Glibc.h @@ -29,6 +29,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_libc_H) # define _libc_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/Glibm.h b/gcc/m2/mc-boot/Glibm.h index d3c9415070c..19ee9e599ce 100644 --- a/gcc/m2/mc-boot/Glibm.h +++ b/gcc/m2/mc-boot/Glibm.h @@ -29,6 +29,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_libm_H) # define _libm_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/Glists.cc b/gcc/m2/mc-boot/Glists.cc index e33c91d8500..d354e867e77 100644 --- a/gcc/m2/mc-boot/Glists.cc +++ b/gcc/m2/mc-boot/Glists.cc @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include diff --git a/gcc/m2/mc-boot/Glists.h b/gcc/m2/mc-boot/Glists.h index 5cb8058415c..e8414b080fe 100644 --- a/gcc/m2/mc-boot/Glists.h +++ b/gcc/m2/mc-boot/Glists.h @@ -24,6 +24,7 @@ along with GNU Modula-2; see the file COPYING3. If not see #if !defined (_lists_H) # define _lists_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GmcComment.cc b/gcc/m2/mc-boot/GmcComment.cc index 4c7650283ec..6b27d93e6fa 100644 --- a/gcc/m2/mc-boot/GmcComment.cc +++ b/gcc/m2/mc-boot/GmcComment.cc @@ -20,6 +20,7 @@ You should have received a copy of the GNU General Public License along with GNU Modula-2; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include diff --git a/gcc/m2/mc-boot/GmcComment.h b/gcc/m2/mc-boot/GmcComment.h index 39ba8c21595..57952a1cec2 100644 --- a/gcc/m2/mc-boot/GmcComment.h +++ b/gcc/m2/mc-boot/GmcComment.h @@ -24,6 +24,7 @@ along with GNU Modula-2; see the file COPYING3. If not see #if !defined (_mcComment_H) # define _mcComment_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GmcComp.cc b/gcc/m2/mc-boot/GmcComp.cc index c941c618030..ca192aa7456 100644 --- a/gcc/m2/mc-boot/GmcComp.cc +++ b/gcc/m2/mc-boot/GmcComp.cc @@ -16,6 +16,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include diff --git a/gcc/m2/mc-boot/GmcComp.h b/gcc/m2/mc-boot/GmcComp.h index 9ab78a54723..088b6636f96 100644 --- a/gcc/m2/mc-boot/GmcComp.h +++ b/gcc/m2/mc-boot/GmcComp.h @@ -24,6 +24,7 @@ along with GNU Modula-2; see the file COPYING3. If not see #if !defined (_mcComp_H) # define _mcComp_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GmcDebug.cc b/gcc/m2/mc-boot/GmcDebug.cc index 0085384f2c9..7ded4aee139 100644 --- a/gcc/m2/mc-boot/GmcDebug.cc +++ b/gcc/m2/mc-boot/GmcDebug.cc @@ -15,6 +15,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include diff --git a/gcc/m2/mc-boot/GmcDebug.h b/gcc/m2/mc-boot/GmcDebug.h index e8ec34b2be4..8de6dc46e7e 100644 --- a/gcc/m2/mc-boot/GmcDebug.h +++ b/gcc/m2/mc-boot/GmcDebug.h @@ -24,6 +24,7 @@ along with GNU Modula-2; see the file COPYING3. If not see #if !defined (_mcDebug_H) # define _mcDebug_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GmcError.cc b/gcc/m2/mc-boot/GmcError.cc index 5893201913f..cb5e30fa8cc 100644 --- a/gcc/m2/mc-boot/GmcError.cc +++ b/gcc/m2/mc-boot/GmcError.cc @@ -20,6 +20,7 @@ You should have received a copy of the GNU General Public License along with GNU Modula-2; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include diff --git a/gcc/m2/mc-boot/GmcError.h b/gcc/m2/mc-boot/GmcError.h index 6a62fcd540f..0c369b2d006 100644 --- a/gcc/m2/mc-boot/GmcError.h +++ b/gcc/m2/mc-boot/GmcError.h @@ -24,6 +24,7 @@ along with GNU Modula-2; see the file COPYING3. If not see #if !defined (_mcError_H) # define _mcError_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GmcFileName.cc b/gcc/m2/mc-boot/GmcFileName.cc index 3b516594c59..f0f69129e06 100644 --- a/gcc/m2/mc-boot/GmcFileName.cc +++ b/gcc/m2/mc-boot/GmcFileName.cc @@ -15,6 +15,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include diff --git a/gcc/m2/mc-boot/GmcFileName.h b/gcc/m2/mc-boot/GmcFileName.h index a5a9afa8376..42c05b97090 100644 --- a/gcc/m2/mc-boot/GmcFileName.h +++ b/gcc/m2/mc-boot/GmcFileName.h @@ -24,6 +24,7 @@ along with GNU Modula-2; see the file COPYING3. If not see #if !defined (_mcFileName_H) # define _mcFileName_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GmcLexBuf.cc b/gcc/m2/mc-boot/GmcLexBuf.cc index 4cbd54429d1..39860c25ff7 100644 --- a/gcc/m2/mc-boot/GmcLexBuf.cc +++ b/gcc/m2/mc-boot/GmcLexBuf.cc @@ -20,6 +20,7 @@ You should have received a copy of the GNU General Public License along with GNU Modula-2; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include diff --git a/gcc/m2/mc-boot/GmcLexBuf.h b/gcc/m2/mc-boot/GmcLexBuf.h index ca71dd83adb..714d0491b00 100644 --- a/gcc/m2/mc-boot/GmcLexBuf.h +++ b/gcc/m2/mc-boot/GmcLexBuf.h @@ -24,6 +24,7 @@ along with GNU Modula-2; see the file COPYING3. If not see #if !defined (_mcLexBuf_H) # define _mcLexBuf_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GmcMetaError.cc b/gcc/m2/mc-boot/GmcMetaError.cc index af64604534e..9298d0e4192 100644 --- a/gcc/m2/mc-boot/GmcMetaError.cc +++ b/gcc/m2/mc-boot/GmcMetaError.cc @@ -15,6 +15,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include diff --git a/gcc/m2/mc-boot/GmcMetaError.h b/gcc/m2/mc-boot/GmcMetaError.h index a3c19c4c3a3..78dc1287905 100644 --- a/gcc/m2/mc-boot/GmcMetaError.h +++ b/gcc/m2/mc-boot/GmcMetaError.h @@ -24,6 +24,7 @@ along with GNU Modula-2; see the file COPYING3. If not see #if !defined (_mcMetaError_H) # define _mcMetaError_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GmcOptions.cc b/gcc/m2/mc-boot/GmcOptions.cc index 5a060604709..f6e4417b659 100644 --- a/gcc/m2/mc-boot/GmcOptions.cc +++ b/gcc/m2/mc-boot/GmcOptions.cc @@ -15,6 +15,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include diff --git a/gcc/m2/mc-boot/GmcOptions.h b/gcc/m2/mc-boot/GmcOptions.h index 4bb82ecfbe2..b2ead1e4b41 100644 --- a/gcc/m2/mc-boot/GmcOptions.h +++ b/gcc/m2/mc-boot/GmcOptions.h @@ -24,6 +24,7 @@ along with GNU Modula-2; see the file COPYING3. If not see #if !defined (_mcOptions_H) # define _mcOptions_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GmcPreprocess.cc b/gcc/m2/mc-boot/GmcPreprocess.cc index 741109ad7fb..54d89bf33e7 100644 --- a/gcc/m2/mc-boot/GmcPreprocess.cc +++ b/gcc/m2/mc-boot/GmcPreprocess.cc @@ -15,6 +15,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include diff --git a/gcc/m2/mc-boot/GmcPreprocess.h b/gcc/m2/mc-boot/GmcPreprocess.h index f12c781d173..fcbd0c3dfd5 100644 --- a/gcc/m2/mc-boot/GmcPreprocess.h +++ b/gcc/m2/mc-boot/GmcPreprocess.h @@ -24,6 +24,7 @@ along with GNU Modula-2; see the file COPYING3. If not see #if !defined (_mcPreprocess_H) # define _mcPreprocess_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GmcPretty.cc b/gcc/m2/mc-boot/GmcPretty.cc index 0bffa1ff6fe..c0be8c1e499 100644 --- a/gcc/m2/mc-boot/GmcPretty.cc +++ b/gcc/m2/mc-boot/GmcPretty.cc @@ -15,6 +15,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include diff --git a/gcc/m2/mc-boot/GmcPretty.h b/gcc/m2/mc-boot/GmcPretty.h index 1a61c893261..c1d59ced8cb 100644 --- a/gcc/m2/mc-boot/GmcPretty.h +++ b/gcc/m2/mc-boot/GmcPretty.h @@ -24,6 +24,7 @@ along with GNU Modula-2; see the file COPYING3. If not see #if !defined (_mcPretty_H) # define _mcPretty_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GmcPrintf.cc b/gcc/m2/mc-boot/GmcPrintf.cc index e91e55acc14..dafa728437f 100644 --- a/gcc/m2/mc-boot/GmcPrintf.cc +++ b/gcc/m2/mc-boot/GmcPrintf.cc @@ -15,6 +15,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include diff --git a/gcc/m2/mc-boot/GmcPrintf.h b/gcc/m2/mc-boot/GmcPrintf.h index 46aeaacf888..1f242a88554 100644 --- a/gcc/m2/mc-boot/GmcPrintf.h +++ b/gcc/m2/mc-boot/GmcPrintf.h @@ -24,6 +24,7 @@ along with GNU Modula-2; see the file COPYING3. If not see #if !defined (_mcPrintf_H) # define _mcPrintf_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GmcQuiet.cc b/gcc/m2/mc-boot/GmcQuiet.cc index d0f2f009b2a..3309f13d736 100644 --- a/gcc/m2/mc-boot/GmcQuiet.cc +++ b/gcc/m2/mc-boot/GmcQuiet.cc @@ -15,6 +15,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include diff --git a/gcc/m2/mc-boot/GmcQuiet.h b/gcc/m2/mc-boot/GmcQuiet.h index 9065ff9c578..be6f4eaa001 100644 --- a/gcc/m2/mc-boot/GmcQuiet.h +++ b/gcc/m2/mc-boot/GmcQuiet.h @@ -24,6 +24,7 @@ along with GNU Modula-2; see the file COPYING3. If not see #if !defined (_mcQuiet_H) # define _mcQuiet_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GmcReserved.cc b/gcc/m2/mc-boot/GmcReserved.cc index a42f1b1b0ac..02132e48b4b 100644 --- a/gcc/m2/mc-boot/GmcReserved.cc +++ b/gcc/m2/mc-boot/GmcReserved.cc @@ -15,6 +15,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include diff --git a/gcc/m2/mc-boot/GmcReserved.h b/gcc/m2/mc-boot/GmcReserved.h index ab844ee5c93..b7817027249 100644 --- a/gcc/m2/mc-boot/GmcReserved.h +++ b/gcc/m2/mc-boot/GmcReserved.h @@ -24,6 +24,7 @@ along with GNU Modula-2; see the file COPYING3. If not see #if !defined (_mcReserved_H) # define _mcReserved_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GmcSearch.cc b/gcc/m2/mc-boot/GmcSearch.cc index e1a2aa63e29..14d3e3fe0ab 100644 --- a/gcc/m2/mc-boot/GmcSearch.cc +++ b/gcc/m2/mc-boot/GmcSearch.cc @@ -15,6 +15,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include diff --git a/gcc/m2/mc-boot/GmcSearch.h b/gcc/m2/mc-boot/GmcSearch.h index f4324a02436..36ed6093637 100644 --- a/gcc/m2/mc-boot/GmcSearch.h +++ b/gcc/m2/mc-boot/GmcSearch.h @@ -24,6 +24,7 @@ along with GNU Modula-2; see the file COPYING3. If not see #if !defined (_mcSearch_H) # define _mcSearch_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GmcStack.cc b/gcc/m2/mc-boot/GmcStack.cc index 70f937b4299..8edae475e6d 100644 --- a/gcc/m2/mc-boot/GmcStack.cc +++ b/gcc/m2/mc-boot/GmcStack.cc @@ -15,6 +15,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include diff --git a/gcc/m2/mc-boot/GmcStack.h b/gcc/m2/mc-boot/GmcStack.h index 70b22be94f1..476ff65fe69 100644 --- a/gcc/m2/mc-boot/GmcStack.h +++ b/gcc/m2/mc-boot/GmcStack.h @@ -24,6 +24,7 @@ along with GNU Modula-2; see the file COPYING3. If not see #if !defined (_mcStack_H) # define _mcStack_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GmcStream.cc b/gcc/m2/mc-boot/GmcStream.cc index da44d8f66a8..18430606d0f 100644 --- a/gcc/m2/mc-boot/GmcStream.cc +++ b/gcc/m2/mc-boot/GmcStream.cc @@ -20,6 +20,7 @@ You should have received a copy of the GNU General Public License along with GNU Modula-2; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include diff --git a/gcc/m2/mc-boot/GmcStream.h b/gcc/m2/mc-boot/GmcStream.h index a156d880d54..473b05df7ac 100644 --- a/gcc/m2/mc-boot/GmcStream.h +++ b/gcc/m2/mc-boot/GmcStream.h @@ -24,6 +24,7 @@ along with GNU Modula-2; see the file COPYING3. If not see #if !defined (_mcStream_H) # define _mcStream_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/Gmcflex.h b/gcc/m2/mc-boot/Gmcflex.h index 9e6d4c48edf..ff14f9fdfef 100644 --- a/gcc/m2/mc-boot/Gmcflex.h +++ b/gcc/m2/mc-boot/Gmcflex.h @@ -24,6 +24,7 @@ along with GNU Modula-2; see the file COPYING3. If not see #if !defined (_mcflex_H) # define _mcflex_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/Gmcp1.cc b/gcc/m2/mc-boot/Gmcp1.cc index b4ccf806cb0..8971c323b67 100644 --- a/gcc/m2/mc-boot/Gmcp1.cc +++ b/gcc/m2/mc-boot/Gmcp1.cc @@ -20,6 +20,7 @@ You should have received a copy of the GNU General Public License along with GNU Modula-2; see the file COPYING. If not, see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include diff --git a/gcc/m2/mc-boot/Gmcp1.h b/gcc/m2/mc-boot/Gmcp1.h index 878d1642c62..758d8c0ae3e 100644 --- a/gcc/m2/mc-boot/Gmcp1.h +++ b/gcc/m2/mc-boot/Gmcp1.h @@ -24,6 +24,7 @@ along with GNU Modula-2; see the file COPYING3. If not see #if !defined (_mcp1_H) # define _mcp1_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/Gmcp2.cc b/gcc/m2/mc-boot/Gmcp2.cc index f61e42220d4..2a3a38c63ea 100644 --- a/gcc/m2/mc-boot/Gmcp2.cc +++ b/gcc/m2/mc-boot/Gmcp2.cc @@ -20,6 +20,7 @@ You should have received a copy of the GNU General Public License along with GNU Modula-2; see the file COPYING. If not, see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include diff --git a/gcc/m2/mc-boot/Gmcp2.h b/gcc/m2/mc-boot/Gmcp2.h index b483b2dc248..ec894e1ba26 100644 --- a/gcc/m2/mc-boot/Gmcp2.h +++ b/gcc/m2/mc-boot/Gmcp2.h @@ -24,6 +24,7 @@ along with GNU Modula-2; see the file COPYING3. If not see #if !defined (_mcp2_H) # define _mcp2_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/Gmcp3.cc b/gcc/m2/mc-boot/Gmcp3.cc index 5cb83f464e7..b5ade482801 100644 --- a/gcc/m2/mc-boot/Gmcp3.cc +++ b/gcc/m2/mc-boot/Gmcp3.cc @@ -20,6 +20,7 @@ You should have received a copy of the GNU General Public License along with GNU Modula-2; see the file COPYING. If not, see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include diff --git a/gcc/m2/mc-boot/Gmcp3.h b/gcc/m2/mc-boot/Gmcp3.h index 0e00ddcdd9b..87856ed51e1 100644 --- a/gcc/m2/mc-boot/Gmcp3.h +++ b/gcc/m2/mc-boot/Gmcp3.h @@ -24,6 +24,7 @@ along with GNU Modula-2; see the file COPYING3. If not see #if !defined (_mcp3_H) # define _mcp3_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/Gmcp4.cc b/gcc/m2/mc-boot/Gmcp4.cc index ce8cb78f443..869763713d6 100644 --- a/gcc/m2/mc-boot/Gmcp4.cc +++ b/gcc/m2/mc-boot/Gmcp4.cc @@ -20,6 +20,7 @@ You should have received a copy of the GNU General Public License along with GNU Modula-2; see the file COPYING. If not, see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include diff --git a/gcc/m2/mc-boot/Gmcp4.h b/gcc/m2/mc-boot/Gmcp4.h index 643b939a634..c229beb3c20 100644 --- a/gcc/m2/mc-boot/Gmcp4.h +++ b/gcc/m2/mc-boot/Gmcp4.h @@ -24,6 +24,7 @@ along with GNU Modula-2; see the file COPYING3. If not see #if !defined (_mcp4_H) # define _mcp4_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/Gmcp5.cc b/gcc/m2/mc-boot/Gmcp5.cc index 909c62215c8..ec241691a95 100644 --- a/gcc/m2/mc-boot/Gmcp5.cc +++ b/gcc/m2/mc-boot/Gmcp5.cc @@ -20,6 +20,7 @@ You should have received a copy of the GNU General Public License along with GNU Modula-2; see the file COPYING. If not, see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include diff --git a/gcc/m2/mc-boot/Gmcp5.h b/gcc/m2/mc-boot/Gmcp5.h index 7989101e86a..de3edb17922 100644 --- a/gcc/m2/mc-boot/Gmcp5.h +++ b/gcc/m2/mc-boot/Gmcp5.h @@ -24,6 +24,7 @@ along with GNU Modula-2; see the file COPYING3. If not see #if !defined (_mcp5_H) # define _mcp5_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GnameKey.cc b/gcc/m2/mc-boot/GnameKey.cc index 3e868886e29..8f4a330d0d9 100644 --- a/gcc/m2/mc-boot/GnameKey.cc +++ b/gcc/m2/mc-boot/GnameKey.cc @@ -20,6 +20,7 @@ You should have received a copy of the GNU General Public License along with GNU Modula-2; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include diff --git a/gcc/m2/mc-boot/GnameKey.h b/gcc/m2/mc-boot/GnameKey.h index a2ea330b063..d4cce1b6bd3 100644 --- a/gcc/m2/mc-boot/GnameKey.h +++ b/gcc/m2/mc-boot/GnameKey.h @@ -24,6 +24,7 @@ along with GNU Modula-2; see the file COPYING3. If not see #if !defined (_nameKey_H) # define _nameKey_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GsymbolKey.cc b/gcc/m2/mc-boot/GsymbolKey.cc index 17072597304..50b8c8f56c3 100644 --- a/gcc/m2/mc-boot/GsymbolKey.cc +++ b/gcc/m2/mc-boot/GsymbolKey.cc @@ -20,6 +20,7 @@ You should have received a copy of the GNU General Public License along with GNU Modula-2; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include diff --git a/gcc/m2/mc-boot/GsymbolKey.h b/gcc/m2/mc-boot/GsymbolKey.h index 69670985516..5d05977e50a 100644 --- a/gcc/m2/mc-boot/GsymbolKey.h +++ b/gcc/m2/mc-boot/GsymbolKey.h @@ -24,6 +24,7 @@ along with GNU Modula-2; see the file COPYING3. If not see #if !defined (_symbolKey_H) # define _symbolKey_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/Gtermios.h b/gcc/m2/mc-boot/Gtermios.h index acb7fcf0c76..70c0c49948e 100644 --- a/gcc/m2/mc-boot/Gtermios.h +++ b/gcc/m2/mc-boot/Gtermios.h @@ -29,6 +29,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_termios_H) # define _termios_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/Gtop.cc b/gcc/m2/mc-boot/Gtop.cc index dfefe42c1da..1a8597a0426 100644 --- a/gcc/m2/mc-boot/Gtop.cc +++ b/gcc/m2/mc-boot/Gtop.cc @@ -20,6 +20,7 @@ You should have received a copy of the GNU General Public License along with GNU Modula-2; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include diff --git a/gcc/m2/mc-boot/Gvarargs.cc b/gcc/m2/mc-boot/Gvarargs.cc index 69f5f2c5756..32f984d24fc 100644 --- a/gcc/m2/mc-boot/Gvarargs.cc +++ b/gcc/m2/mc-boot/Gvarargs.cc @@ -20,6 +20,7 @@ You should have received a copy of the GNU General Public License along with GNU Modula-2; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include diff --git a/gcc/m2/mc-boot/Gvarargs.h b/gcc/m2/mc-boot/Gvarargs.h index 82b5b753ba1..8e3e91a1c42 100644 --- a/gcc/m2/mc-boot/Gvarargs.h +++ b/gcc/m2/mc-boot/Gvarargs.h @@ -24,6 +24,7 @@ along with GNU Modula-2; see the file COPYING3. If not see #if !defined (_varargs_H) # define _varargs_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/Gwlists.cc b/gcc/m2/mc-boot/Gwlists.cc index 87daa42c3ef..9262329e77a 100644 --- a/gcc/m2/mc-boot/Gwlists.cc +++ b/gcc/m2/mc-boot/Gwlists.cc @@ -20,6 +20,7 @@ You should have received a copy of the GNU General Public License along with GNU Modula-2; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include diff --git a/gcc/m2/mc-boot/Gwlists.h b/gcc/m2/mc-boot/Gwlists.h index 05d65945b58..53bad73339a 100644 --- a/gcc/m2/mc-boot/Gwlists.h +++ b/gcc/m2/mc-boot/Gwlists.h @@ -24,6 +24,7 @@ along with GNU Modula-2; see the file COPYING3. If not see #if !defined (_wlists_H) # define _wlists_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/Gwrapc.h b/gcc/m2/mc-boot/Gwrapc.h index e4db1e2a99f..fdbeabcdade 100644 --- a/gcc/m2/mc-boot/Gwrapc.h +++ b/gcc/m2/mc-boot/Gwrapc.h @@ -29,6 +29,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_wrapc_H) # define _wrapc_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc/keyc.mod b/gcc/m2/mc/keyc.mod index f3f09309ad5..a182e120692 100644 --- a/gcc/m2/mc/keyc.mod +++ b/gcc/m2/mc/keyc.mod @@ -95,6 +95,7 @@ BEGIN IF NOT initializedGCC THEN initializedGCC := TRUE ; + print (p, '#define INCLUDE_MEMORY\n'); print (p, '#include "config.h"\n'); print (p, '#include "system.h"\n'); checkGccTypes (p) diff --git a/gcc/m2/pge-boot/GASCII.cc b/gcc/m2/pge-boot/GASCII.cc index 19e98ede436..21b621105a9 100644 --- a/gcc/m2/pge-boot/GASCII.cc +++ b/gcc/m2/pge-boot/GASCII.cc @@ -32,9 +32,9 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see typedef struct { PROC_t proc; } PROC; # endif -#define _ASCII_H #define _ASCII_C +#include "GASCII.h" # define ASCII_nul (char) 000 # define ASCII_soh (char) 001 diff --git a/gcc/m2/pge-boot/GASCII.h b/gcc/m2/pge-boot/GASCII.h index c157a8b7686..6346caa1189 100644 --- a/gcc/m2/pge-boot/GASCII.h +++ b/gcc/m2/pge-boot/GASCII.h @@ -29,8 +29,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_ASCII_H) # define _ASCII_H -#include "config.h" -#include "system.h" # ifdef __cplusplus extern "C" { # endif diff --git a/gcc/m2/pge-boot/GArgs.cc b/gcc/m2/pge-boot/GArgs.cc index 284567d750a..c295985178d 100644 --- a/gcc/m2/pge-boot/GArgs.cc +++ b/gcc/m2/pge-boot/GArgs.cc @@ -32,9 +32,9 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see typedef struct { PROC_t proc; } PROC; # endif -#define _Args_H #define _Args_C +#include "GArgs.h" # include "GUnixArgs.h" # include "GASCII.h" @@ -84,13 +84,13 @@ extern "C" bool Args_GetArg (char *a, unsigned int _a_high, unsigned int n) Source = static_cast (UnixArgs_GetArgV ()); while ((j < High) && ((*(*Source).array[i]).array[j] != ASCII_nul)) { - a[j] = (*(*Source).array[i]).array[j]; + const_cast(a)[j] = (*(*Source).array[i]).array[j]; j += 1; } } if (j <= High) { - a[j] = ASCII_nul; + const_cast(a)[j] = ASCII_nul; } return i < (UnixArgs_GetArgC ()); /* static analysis guarentees a RETURN statement will be used before here. */ diff --git a/gcc/m2/pge-boot/GArgs.h b/gcc/m2/pge-boot/GArgs.h index 1171cef8d72..b912da63c7c 100644 --- a/gcc/m2/pge-boot/GArgs.h +++ b/gcc/m2/pge-boot/GArgs.h @@ -29,8 +29,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_Args_H) # define _Args_H -#include "config.h" -#include "system.h" # ifdef __cplusplus extern "C" { # endif diff --git a/gcc/m2/pge-boot/GAssertion.cc b/gcc/m2/pge-boot/GAssertion.cc index 3dae36d748a..8aad1cd5557 100644 --- a/gcc/m2/pge-boot/GAssertion.cc +++ b/gcc/m2/pge-boot/GAssertion.cc @@ -32,9 +32,9 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see typedef struct { PROC_t proc; } PROC; # endif -#define _Assertion_H #define _Assertion_C +#include "GAssertion.h" # include "GStrIO.h" # include "GM2RTS.h" diff --git a/gcc/m2/pge-boot/GAssertion.h b/gcc/m2/pge-boot/GAssertion.h index d909fdee7a3..9e0777fc60b 100644 --- a/gcc/m2/pge-boot/GAssertion.h +++ b/gcc/m2/pge-boot/GAssertion.h @@ -29,8 +29,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_Assertion_H) # define _Assertion_H -#include "config.h" -#include "system.h" # ifdef __cplusplus extern "C" { # endif diff --git a/gcc/m2/pge-boot/GBreak.h b/gcc/m2/pge-boot/GBreak.h index bd2f1ccf6f1..635d82cfbe3 100644 --- a/gcc/m2/pge-boot/GBreak.h +++ b/gcc/m2/pge-boot/GBreak.h @@ -29,8 +29,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_Break_H) # define _Break_H -#include "config.h" -#include "system.h" # ifdef __cplusplus extern "C" { # endif diff --git a/gcc/m2/pge-boot/GCmdArgs.h b/gcc/m2/pge-boot/GCmdArgs.h index 7f39815bc09..c7b3dd22d46 100644 --- a/gcc/m2/pge-boot/GCmdArgs.h +++ b/gcc/m2/pge-boot/GCmdArgs.h @@ -29,8 +29,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_CmdArgs_H) # define _CmdArgs_H -#include "config.h" -#include "system.h" # ifdef __cplusplus extern "C" { # endif diff --git a/gcc/m2/pge-boot/GDebug.cc b/gcc/m2/pge-boot/GDebug.cc index deb7f9e7aeb..91dd96046a4 100644 --- a/gcc/m2/pge-boot/GDebug.cc +++ b/gcc/m2/pge-boot/GDebug.cc @@ -34,9 +34,9 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #include #include -#define _Debug_H #define _Debug_C +#include "GDebug.h" # include "GASCII.h" # include "GNumberIO.h" # include "GStdIO.h" diff --git a/gcc/m2/pge-boot/GDebug.h b/gcc/m2/pge-boot/GDebug.h index 8787752b9a3..c853211e16e 100644 --- a/gcc/m2/pge-boot/GDebug.h +++ b/gcc/m2/pge-boot/GDebug.h @@ -29,8 +29,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_Debug_H) # define _Debug_H -#include "config.h" -#include "system.h" # ifdef __cplusplus extern "C" { # endif diff --git a/gcc/m2/pge-boot/GDynamicStrings.cc b/gcc/m2/pge-boot/GDynamicStrings.cc index 32969692985..d6f5f83ad5b 100644 --- a/gcc/m2/pge-boot/GDynamicStrings.cc +++ b/gcc/m2/pge-boot/GDynamicStrings.cc @@ -25,8 +25,6 @@ a copy of the GCC Runtime Library Exception along with this program; see the files COPYING3 and COPYING.RUNTIME respectively. If not, see . */ -#include "config.h" -#include "system.h" #include # if !defined (PROC_D) # define PROC_D @@ -42,7 +40,12 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see # define FALSE (1==0) # endif +#include +#include +#include +#include # include "GStorage.h" +#include #if defined(__cplusplus) # undef NULL # define NULL 0 @@ -2064,7 +2067,7 @@ extern "C" DynamicStrings_String DynamicStrings_Slice (DynamicStrings_String s, DynamicStrings_String__opaque d; DynamicStrings_String__opaque t; int start; - int end; + int stop; int o; if (PoisonOn) @@ -2107,7 +2110,7 @@ extern "C" DynamicStrings_String DynamicStrings_Slice (DynamicStrings_String s, { start = low-o; } - end = Max (Min (MaxBuf, static_cast (high-o)), 0); + stop = Max (Min (MaxBuf, static_cast (high-o)), 0); while (t->contents.len == MaxBuf) { if (t->contents.next == NULL) @@ -2123,7 +2126,7 @@ extern "C" DynamicStrings_String DynamicStrings_Slice (DynamicStrings_String s, } t = t->contents.next; } - ConcatContentsAddress (&t->contents, &static_cast (s)->contents.buf.array[start], static_cast (end-start)); + ConcatContentsAddress (&t->contents, &static_cast (s)->contents.buf.array[start], static_cast (stop-start)); o += static_cast (s)->contents.len; s = static_cast (static_cast (s)->contents.next); } diff --git a/gcc/m2/pge-boot/GDynamicStrings.h b/gcc/m2/pge-boot/GDynamicStrings.h index e0652a7d3bd..4d77cecc591 100644 --- a/gcc/m2/pge-boot/GDynamicStrings.h +++ b/gcc/m2/pge-boot/GDynamicStrings.h @@ -29,8 +29,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_DynamicStrings_H) # define _DynamicStrings_H -#include "config.h" -#include "system.h" # ifdef __cplusplus extern "C" { # endif diff --git a/gcc/m2/pge-boot/GEnvironment.h b/gcc/m2/pge-boot/GEnvironment.h index 4f94d583334..4645a495415 100644 --- a/gcc/m2/pge-boot/GEnvironment.h +++ b/gcc/m2/pge-boot/GEnvironment.h @@ -29,8 +29,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_Environment_H) # define _Environment_H -#include "config.h" -#include "system.h" # ifdef __cplusplus extern "C" { # endif diff --git a/gcc/m2/pge-boot/GFIO.cc b/gcc/m2/pge-boot/GFIO.cc index 3e56792f20f..b30d969e11f 100644 --- a/gcc/m2/pge-boot/GFIO.cc +++ b/gcc/m2/pge-boot/GFIO.cc @@ -52,9 +52,9 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see # undef NULL # define NULL 0 #endif -#define _FIO_H #define _FIO_C +#include "GFIO.h" # include "GSYSTEM.h" # include "GASCII.h" # include "GStrLib.h" @@ -67,9 +67,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see typedef unsigned int FIO_File; -FIO_File FIO_StdErr; -FIO_File FIO_StdOut; -FIO_File FIO_StdIn; # define MaxBufferLength (1024*16) # define MaxErrorString (1024*8) # define CreatePermissions 0666 @@ -643,7 +640,7 @@ static FIO_File InitializeFile (FIO_File f, void * fname, unsigned int flength, { fd->buffer->left = 0; } - fd->buffer->contents = reinterpret_cast (fd->buffer->address); /* provides easy access for reading characters */ + fd->buffer->contents = static_cast (fd->buffer->address); /* provides easy access for reading characters */ fd->state = fstate; /* provides easy access for reading characters */ } } @@ -917,7 +914,7 @@ static void HandleEscape (char *dest, unsigned int _dest_high, const char *src_, if (src[(*i)+1] == 'n') { /* requires a newline */ - dest[(*j)] = ASCII_nl; + const_cast(dest)[(*j)] = ASCII_nl; (*j) += 1; (*i) += 2; } @@ -925,7 +922,7 @@ static void HandleEscape (char *dest, unsigned int _dest_high, const char *src_, { /* avoid dangling else. */ /* requires a tab (yuck) tempted to fake this but I better not.. */ - dest[(*j)] = ASCII_tab; + const_cast(dest)[(*j)] = ASCII_tab; (*j) += 1; (*i) += 2; } @@ -934,7 +931,7 @@ static void HandleEscape (char *dest, unsigned int _dest_high, const char *src_, /* avoid dangling else. */ /* copy escaped character */ (*i) += 1; - dest[(*j)] = src[(*i)]; + const_cast(dest)[(*j)] = src[(*i)]; (*j) += 1; (*i) += 1; } @@ -958,7 +955,7 @@ static void Cast (unsigned char *a, unsigned int _a_high, const unsigned char *b { for (i=0; i<=_a_high; i++) { - a[i] = b[i]; + const_cast(a)[i] = b[i]; } } else @@ -1008,7 +1005,7 @@ static void StringFormat1 (char *dest, unsigned int _dest_high, const char *src_ } else { - dest[j] = src[i]; + const_cast(dest)[j] = src[i]; i += 1; j += 1; } @@ -1021,13 +1018,13 @@ static void StringFormat1 (char *dest, unsigned int _dest_high, const char *src_ Cast ((unsigned char *) &p, (sizeof (p)-1), (const unsigned char *) w, _w_high); while ((j < HighDest) && ((*p) != ASCII_nul)) { - dest[j] = (*p); + const_cast(dest)[j] = (*p); j += 1; p += 1; } if (j < HighDest) { - dest[j] = ASCII_nul; + const_cast(dest)[j] = ASCII_nul; } j = StrLib_StrLen ((const char *) dest, _dest_high); i += 2; @@ -1035,7 +1032,7 @@ static void StringFormat1 (char *dest, unsigned int _dest_high, const char *src_ else if (src[i+1] == 'd') { /* avoid dangling else. */ - dest[j] = ASCII_nul; + const_cast(dest)[j] = ASCII_nul; Cast ((unsigned char *) &c, (sizeof (c)-1), (const unsigned char *) w, _w_high); NumberIO_CardToStr (c, 0, (char *) &str.array[0], MaxErrorString); StrLib_StrConCat ((const char *) dest, _dest_high, (const char *) &str.array[0], MaxErrorString, (char *) dest, _dest_high); @@ -1045,7 +1042,7 @@ static void StringFormat1 (char *dest, unsigned int _dest_high, const char *src_ else { /* avoid dangling else. */ - dest[j] = src[i]; + const_cast(dest)[j] = src[i]; i += 1; j += 1; } @@ -1059,14 +1056,14 @@ static void StringFormat1 (char *dest, unsigned int _dest_high, const char *src_ } else { - dest[j] = src[i]; + const_cast(dest)[j] = src[i]; i += 1; j += 1; } } if (j < HighDest) { - dest[j] = ASCII_nul; + const_cast(dest)[j] = ASCII_nul; } } @@ -1316,7 +1313,7 @@ static void PreInitialize (FIO_File f, const char *fname_, unsigned int _fname_h /* make a local copy of each unbounded array. */ memcpy (fname, fname_, _fname_high+1); - if ((InitializeFile (f, &fname, StrLib_StrLen ((const char *) fname, _fname_high), state, use, towrite, bufsize)) == f) + if ((InitializeFile (f, const_cast (static_cast(fname)), StrLib_StrLen ((const char *) fname, _fname_high), state, use, towrite, bufsize)) == f) { fd = static_cast (Indexing_GetIndice (FileInfo, f)); if (f == Error) @@ -1418,7 +1415,7 @@ extern "C" bool FIO_Exists (const char *fname_, unsigned int _fname_high) /* The following functions are wrappers for the above. */ - return FIO_exists (&fname, StrLib_StrLen ((const char *) fname, _fname_high)); + return FIO_exists (const_cast (static_cast(fname)), StrLib_StrLen ((const char *) fname, _fname_high)); /* static analysis guarentees a RETURN statement will be used before here. */ __builtin_unreachable (); } @@ -1430,7 +1427,7 @@ extern "C" FIO_File FIO_OpenToRead (const char *fname_, unsigned int _fname_high /* make a local copy of each unbounded array. */ memcpy (fname, fname_, _fname_high+1); - return FIO_openToRead (&fname, StrLib_StrLen ((const char *) fname, _fname_high)); + return FIO_openToRead (const_cast (static_cast(fname)), StrLib_StrLen ((const char *) fname, _fname_high)); /* static analysis guarentees a RETURN statement will be used before here. */ __builtin_unreachable (); } @@ -1442,7 +1439,7 @@ extern "C" FIO_File FIO_OpenToWrite (const char *fname_, unsigned int _fname_hig /* make a local copy of each unbounded array. */ memcpy (fname, fname_, _fname_high+1); - return FIO_openToWrite (&fname, StrLib_StrLen ((const char *) fname, _fname_high)); + return FIO_openToWrite (const_cast (static_cast(fname)), StrLib_StrLen ((const char *) fname, _fname_high)); /* static analysis guarentees a RETURN statement will be used before here. */ __builtin_unreachable (); } @@ -1454,7 +1451,7 @@ extern "C" FIO_File FIO_OpenForRandom (const char *fname_, unsigned int _fname_h /* make a local copy of each unbounded array. */ memcpy (fname, fname_, _fname_high+1); - return FIO_openForRandom (&fname, StrLib_StrLen ((const char *) fname, _fname_high), towrite, newfile); + return FIO_openForRandom (const_cast (static_cast(fname)), StrLib_StrLen ((const char *) fname, _fname_high), towrite, newfile); /* static analysis guarentees a RETURN statement will be used before here. */ __builtin_unreachable (); } @@ -1970,7 +1967,7 @@ extern "C" void FIO_WriteString (FIO_File f, const char *a_, unsigned int _a_hig memcpy (a, a_, _a_high+1); l = StrLib_StrLen ((const char *) a, _a_high); - if ((FIO_WriteNBytes (f, l, &a)) != l) + if ((FIO_WriteNBytes (f, l, const_cast (static_cast(a)))) != l) {} /* empty. */ } @@ -1997,12 +1994,12 @@ extern "C" void FIO_ReadString (FIO_File f, char *a, unsigned int _a_high) /* avoid gcc warning by using compound statement even if not strictly necessary. */ if (((ch == ASCII_nl) || (! (FIO_IsNoError (f)))) || (FIO_EOF (f))) { - a[i] = ASCII_nul; + const_cast(a)[i] = ASCII_nul; i += 1; } else { - a[i] = ch; + const_cast(a)[i] = ch; i += 1; } } @@ -2226,7 +2223,7 @@ extern "C" void FIO_GetFileName (FIO_File f, char *a, unsigned int _a_high) i = 0; while (((*p) != ASCII_nul) && (i <= _a_high)) { - a[i] = (*p); + const_cast(a)[i] = (*p); p += 1; i += 1; } diff --git a/gcc/m2/pge-boot/GFIO.h b/gcc/m2/pge-boot/GFIO.h index d82396449ff..160fadee5dd 100644 --- a/gcc/m2/pge-boot/GFIO.h +++ b/gcc/m2/pge-boot/GFIO.h @@ -29,8 +29,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_FIO_H) # define _FIO_H -#include "config.h" -#include "system.h" # ifdef __cplusplus extern "C" { # endif diff --git a/gcc/m2/pge-boot/GFormatStrings.h b/gcc/m2/pge-boot/GFormatStrings.h index 1d8ce34ce62..61f738bb323 100644 --- a/gcc/m2/pge-boot/GFormatStrings.h +++ b/gcc/m2/pge-boot/GFormatStrings.h @@ -29,8 +29,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_FormatStrings_H) # define _FormatStrings_H -#include "config.h" -#include "system.h" # ifdef __cplusplus extern "C" { # endif diff --git a/gcc/m2/pge-boot/GFpuIO.h b/gcc/m2/pge-boot/GFpuIO.h index 5d830606130..70cc45dfcb5 100644 --- a/gcc/m2/pge-boot/GFpuIO.h +++ b/gcc/m2/pge-boot/GFpuIO.h @@ -29,8 +29,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_FpuIO_H) # define _FpuIO_H -#include "config.h" -#include "system.h" # ifdef __cplusplus extern "C" { # endif diff --git a/gcc/m2/pge-boot/GIO.cc b/gcc/m2/pge-boot/GIO.cc index 7d391bb72ff..9f781b5a0d6 100644 --- a/gcc/m2/pge-boot/GIO.cc +++ b/gcc/m2/pge-boot/GIO.cc @@ -42,9 +42,9 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #include #include -#define _IO_H #define _IO_C +#include "GIO.h" # include "GStrLib.h" # include "GSYSTEM.h" # include "Glibc.h" diff --git a/gcc/m2/pge-boot/GIO.h b/gcc/m2/pge-boot/GIO.h index 4f4af9a59a0..ae16019fb70 100644 --- a/gcc/m2/pge-boot/GIO.h +++ b/gcc/m2/pge-boot/GIO.h @@ -29,8 +29,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_IO_H) # define _IO_H -#include "config.h" -#include "system.h" # ifdef __cplusplus extern "C" { # endif diff --git a/gcc/m2/pge-boot/GIndexing.cc b/gcc/m2/pge-boot/GIndexing.cc index 21e3a43a8c8..fa7837c1dd2 100644 --- a/gcc/m2/pge-boot/GIndexing.cc +++ b/gcc/m2/pge-boot/GIndexing.cc @@ -48,9 +48,9 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see # undef NULL # define NULL 0 #endif -#define _Indexing_H #define _Indexing_C +#include "GIndexing.h" # include "Glibc.h" # include "GStorage.h" # include "GSYSTEM.h" @@ -66,10 +66,7 @@ typedef void * *Indexing_PtrToAddress; typedef unsigned char *Indexing_PtrToByte; -typedef Indexing__T2 *Indexing_Index; - -typedef void (*Indexing_IndexProcedure_t) (void *); -struct Indexing_IndexProcedure_p { Indexing_IndexProcedure_t proc; }; +typedef Indexing__T2 *Indexing_Index__opaque; struct Indexing__T2_r { void *ArrayStart; @@ -178,6 +175,13 @@ extern "C" void Indexing_ForeachIndiceInIndexDo (Indexing_Index i, Indexing_Inde extern "C" bool Indexing_IsEmpty (Indexing_Index i); +/* + FindIndice - returns the indice containing a. + It returns zero if a is not found in array i. +*/ + +extern "C" unsigned int Indexing_FindIndice (Indexing_Index i, void * a); + /* InitIndexTuned - creates a dynamic array with low indice. @@ -188,7 +192,7 @@ extern "C" bool Indexing_IsEmpty (Indexing_Index i); extern "C" Indexing_Index Indexing_InitIndexTuned (unsigned int low, unsigned int minsize, unsigned int growfactor) { - Indexing_Index i; + Indexing_Index__opaque i; Storage_ALLOCATE ((void **) &i, sizeof (Indexing__T2)); i->Low = low; @@ -200,7 +204,7 @@ extern "C" Indexing_Index Indexing_InitIndexTuned (unsigned int low, unsigned in i->Used = 0; i->Map = (unsigned int) 0; i->GrowFactor = growfactor; - return i; + return static_cast (i); /* static analysis guarentees a RETURN statement will be used before here. */ __builtin_unreachable (); } @@ -224,9 +228,9 @@ extern "C" Indexing_Index Indexing_InitIndex (unsigned int low) extern "C" Indexing_Index Indexing_KillIndex (Indexing_Index i) { - Storage_DEALLOCATE (&i->ArrayStart, i->ArraySize); + Storage_DEALLOCATE (&static_cast (i)->ArrayStart, static_cast (i)->ArraySize); Storage_DEALLOCATE ((void **) &i, sizeof (Indexing__T2)); - return NULL; + return static_cast (NULL); /* static analysis guarentees a RETURN statement will be used before here. */ __builtin_unreachable (); } @@ -238,7 +242,7 @@ extern "C" Indexing_Index Indexing_KillIndex (Indexing_Index i) extern "C" Indexing_Index Indexing_DebugIndex (Indexing_Index i) { - i->Debug = true; + static_cast (i)->Debug = true; return i; /* static analysis guarentees a RETURN statement will be used before here. */ __builtin_unreachable (); @@ -259,7 +263,7 @@ extern "C" bool Indexing_InBounds (Indexing_Index i, unsigned int n) } else { - return (n >= i->Low) && (n <= i->High); + return (n >= static_cast (i)->Low) && (n <= static_cast (i)->High); } ReturnException ("../../gcc/m2/gm2-libs/Indexing.def", 25, 1); __builtin_unreachable (); @@ -279,7 +283,7 @@ extern "C" unsigned int Indexing_HighIndice (Indexing_Index i) } else { - return i->High; + return static_cast (i)->High; } ReturnException ("../../gcc/m2/gm2-libs/Indexing.def", 25, 1); __builtin_unreachable (); @@ -299,7 +303,7 @@ extern "C" unsigned int Indexing_LowIndice (Indexing_Index i) } else { - return i->Low; + return static_cast (i)->Low; } ReturnException ("../../gcc/m2/gm2-libs/Indexing.def", 25, 1); __builtin_unreachable (); @@ -321,19 +325,19 @@ extern "C" void Indexing_PutIndice (Indexing_Index i, unsigned int n, void * a) if (! (Indexing_InBounds (i, n))) { /* avoid gcc warning by using compound statement even if not strictly necessary. */ - if (n < i->Low) + if (n < static_cast (i)->Low) { M2RTS_HALT (-1); __builtin_unreachable (); } else { - oldSize = i->ArraySize; - while (((n-i->Low)*sizeof (void *)) >= i->ArraySize) + oldSize = static_cast (i)->ArraySize; + while (((n-static_cast (i)->Low)*sizeof (void *)) >= static_cast (i)->ArraySize) { - i->ArraySize = i->ArraySize*i->GrowFactor; + static_cast (i)->ArraySize = static_cast (i)->ArraySize*static_cast (i)->GrowFactor; } - if (oldSize != i->ArraySize) + if (oldSize != static_cast (i)->ArraySize) { /* IF Debug @@ -343,25 +347,25 @@ extern "C" void Indexing_PutIndice (Indexing_Index i, unsigned int n, void * a) oldSize, ArraySize) END ; */ - Storage_REALLOCATE (&i->ArrayStart, i->ArraySize); + Storage_REALLOCATE (&static_cast (i)->ArrayStart, static_cast (i)->ArraySize); /* and initialize the remainder of the array to NIL */ - b = i->ArrayStart; + b = static_cast (i)->ArrayStart; b = reinterpret_cast (reinterpret_cast (b)+oldSize); - b = libc_memset (b, 0, static_cast (i->ArraySize-oldSize)); + b = libc_memset (b, 0, static_cast (static_cast (i)->ArraySize-oldSize)); } - i->High = n; + static_cast (i)->High = n; } } - b = i->ArrayStart; - b = reinterpret_cast (reinterpret_cast (b)+(n-i->Low)*sizeof (void *)); + b = static_cast (i)->ArrayStart; + b = reinterpret_cast (reinterpret_cast (b)+(n-static_cast (i)->Low)*sizeof (void *)); p = static_cast (b); - (*p) = reinterpret_cast (a); - i->Used += 1; - if (i->Debug) + (*p) = static_cast (a); + static_cast (i)->Used += 1; + if (static_cast (i)->Debug) { if (n < 32) { - i->Map |= (1 << (n )); + static_cast (i)->Map |= (1 << (n )); } } } @@ -381,12 +385,12 @@ extern "C" void * Indexing_GetIndice (Indexing_Index i, unsigned int n) M2RTS_HALT (-1); __builtin_unreachable (); } - b = static_cast (i->ArrayStart); - b += (n-i->Low)*sizeof (void *); + b = static_cast (static_cast (i)->ArrayStart); + b += (n-static_cast (i)->Low)*sizeof (void *); p = (Indexing_PtrToAddress) (b); - if (i->Debug) + if (static_cast (i)->Debug) { - if (((n < 32) && (! ((((1 << (n)) & (i->Map)) != 0)))) && ((*p) != NULL)) + if (((n < 32) && (! ((((1 << (n)) & (static_cast (i)->Map)) != 0)))) && ((*p) != NULL)) { M2RTS_HALT (-1); __builtin_unreachable (); @@ -408,9 +412,9 @@ extern "C" bool Indexing_IsIndiceInIndex (Indexing_Index i, void * a) Indexing_PtrToByte b; Indexing_PtrToAddress p; - j = i->Low; - b = static_cast (i->ArrayStart); - while (j <= i->High) + j = static_cast (i)->Low; + b = static_cast (static_cast (i)->ArrayStart); + while (j <= static_cast (i)->High) { p = (Indexing_PtrToAddress) (b); if ((*p) == a) @@ -437,9 +441,9 @@ extern "C" void Indexing_RemoveIndiceFromIndex (Indexing_Index i, void * a) Indexing_PtrToAddress p; Indexing_PtrToByte b; - j = i->Low; - b = static_cast (i->ArrayStart); - while (j <= i->High) + j = static_cast (i)->Low; + b = static_cast (static_cast (i)->ArrayStart); + while (j <= static_cast (i)->High) { p = (Indexing_PtrToAddress) (b); b += sizeof (void *); @@ -463,13 +467,13 @@ extern "C" void Indexing_DeleteIndice (Indexing_Index i, unsigned int j) if (Indexing_InBounds (i, j)) { - b = static_cast (i->ArrayStart); - b += sizeof (void *)*(j-i->Low); + b = static_cast (static_cast (i)->ArrayStart); + b += sizeof (void *)*(j-static_cast (i)->Low); p = (Indexing_PtrToAddress) (b); b += sizeof (void *); - p = static_cast (libc_memmove (reinterpret_cast (p), reinterpret_cast (b), static_cast ((i->High-j)*sizeof (void *)))); - i->High -= 1; - i->Used -= 1; + p = static_cast (libc_memmove (reinterpret_cast (p), reinterpret_cast (b), static_cast ((static_cast (i)->High-j)*sizeof (void *)))); + static_cast (i)->High -= 1; + static_cast (i)->Used -= 1; } else { @@ -489,7 +493,7 @@ extern "C" void Indexing_IncludeIndiceIntoIndex (Indexing_Index i, void * a) if (! (Indexing_IsIndiceInIndex (i, a))) { /* avoid gcc warning by using compound statement even if not strictly necessary. */ - if (i->Used == 0) + if (static_cast (i)->Used == 0) { Indexing_PutIndice (i, Indexing_LowIndice (i), a); } @@ -524,7 +528,36 @@ extern "C" void Indexing_ForeachIndiceInIndexDo (Indexing_Index i, Indexing_Inde extern "C" bool Indexing_IsEmpty (Indexing_Index i) { - return i->Used == 0; + return static_cast (i)->Used == 0; + /* static analysis guarentees a RETURN statement will be used before here. */ + __builtin_unreachable (); +} + + +/* + FindIndice - returns the indice containing a. + It returns zero if a is not found in array i. +*/ + +extern "C" unsigned int Indexing_FindIndice (Indexing_Index i, void * a) +{ + unsigned int j; + Indexing_PtrToAddress p; + Indexing_PtrToByte b; + + j = static_cast (i)->Low; + b = static_cast (static_cast (i)->ArrayStart); + while (j <= static_cast (i)->High) + { + p = (Indexing_PtrToAddress) (b); + b += sizeof (void *); + if ((*p) == a) + { + return j; + } + j += 1; + } + return 0; /* static analysis guarentees a RETURN statement will be used before here. */ __builtin_unreachable (); } diff --git a/gcc/m2/pge-boot/GIndexing.h b/gcc/m2/pge-boot/GIndexing.h index d65e8bd91dd..264e60ef4cf 100644 --- a/gcc/m2/pge-boot/GIndexing.h +++ b/gcc/m2/pge-boot/GIndexing.h @@ -29,6 +29,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_Indexing_H) # define _Indexing_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus @@ -154,6 +155,13 @@ EXTERN void Indexing_ForeachIndiceInIndexDo (Indexing_Index i, Indexing_IndexPro */ EXTERN bool Indexing_IsEmpty (Indexing_Index i); + +/* + FindIndice - returns the indice containing a. + It returns zero if a is not found in array i. +*/ + +EXTERN unsigned int Indexing_FindIndice (Indexing_Index i, void * a); # ifdef __cplusplus } # endif diff --git a/gcc/m2/pge-boot/GLists.cc b/gcc/m2/pge-boot/GLists.cc index 4b15e2068f8..b49dda72382 100644 --- a/gcc/m2/pge-boot/GLists.cc +++ b/gcc/m2/pge-boot/GLists.cc @@ -41,9 +41,9 @@ along with GNU Modula-2; see the file COPYING3. If not see # undef NULL # define NULL 0 #endif -#define _Lists_H #define _Lists_C +#include "GLists.h" # include "GStorage.h" typedef struct SymbolKey_PerformOperation_p SymbolKey_PerformOperation; @@ -53,16 +53,13 @@ typedef struct Lists_list_r Lists_list; typedef struct Lists__T1_a Lists__T1; -typedef Lists_list *Lists_List; - -typedef void (*SymbolKey_PerformOperation_t) (unsigned int); -struct SymbolKey_PerformOperation_p { SymbolKey_PerformOperation_t proc; }; +typedef Lists_list *Lists_List__opaque; struct Lists__T1_a { unsigned int array[MaxNoOfElements-1+1]; }; struct Lists_list_r { unsigned int NoOfElements; Lists__T1 Elements; - Lists_List Next; + Lists_List__opaque Next; }; @@ -136,14 +133,14 @@ extern "C" Lists_List Lists_DuplicateList (Lists_List l); RemoveItem - remove an element at index, i, from the list data type. */ -static void RemoveItem (Lists_List p, Lists_List l, unsigned int i); +static void RemoveItem (Lists_List__opaque p, Lists_List__opaque l, unsigned int i); /* RemoveItem - remove an element at index, i, from the list data type. */ -static void RemoveItem (Lists_List p, Lists_List l, unsigned int i) +static void RemoveItem (Lists_List__opaque p, Lists_List__opaque l, unsigned int i) { l->NoOfElements -= 1; while (i <= l->NoOfElements) @@ -166,8 +163,8 @@ static void RemoveItem (Lists_List p, Lists_List l, unsigned int i) extern "C" void Lists_InitList (Lists_List *l) { Storage_ALLOCATE ((void **) &(*l), sizeof (Lists_list)); - (*l)->NoOfElements = 0; - (*l)->Next = NULL; + static_cast ((*l))->NoOfElements = 0; + static_cast ((*l))->Next = static_cast (NULL); } @@ -179,9 +176,9 @@ extern "C" void Lists_KillList (Lists_List *l) { if ((*l) != NULL) { - if ((*l)->Next != NULL) + if (static_cast ((*l))->Next != NULL) { - Lists_KillList (&(*l)->Next); + Lists_KillList (reinterpret_cast (&static_cast ((*l))->Next)); } Storage_DEALLOCATE ((void **) &(*l), sizeof (Lists_list)); } @@ -194,21 +191,21 @@ extern "C" void Lists_KillList (Lists_List *l) extern "C" void Lists_PutItemIntoList (Lists_List l, unsigned int c) { - if (l->NoOfElements < MaxNoOfElements) + if (static_cast (l)->NoOfElements < MaxNoOfElements) { - l->NoOfElements += 1; - l->Elements.array[l->NoOfElements-1] = c; + static_cast (l)->NoOfElements += 1; + static_cast (l)->Elements.array[static_cast (l)->NoOfElements-1] = c; } - else if (l->Next != NULL) + else if (static_cast (l)->Next != NULL) { /* avoid dangling else. */ - Lists_PutItemIntoList (l->Next, c); + Lists_PutItemIntoList (static_cast (static_cast (l)->Next), c); } else { /* avoid dangling else. */ - Lists_InitList (&l->Next); - Lists_PutItemIntoList (l->Next, c); + Lists_InitList (reinterpret_cast (&static_cast (l)->Next)); + Lists_PutItemIntoList (static_cast (static_cast (l)->Next), c); } } @@ -217,15 +214,15 @@ extern "C" unsigned int Lists_GetItemFromList (Lists_List l, unsigned int n) /* iterative solution */ while (l != NULL) { - if (n <= l->NoOfElements) + if (n <= static_cast (l)->NoOfElements) { - return l->Elements.array[n-1]; + return static_cast (l)->Elements.array[n-1]; } else { - n -= l->NoOfElements; + n -= static_cast (l)->NoOfElements; } - l = l->Next; + l = static_cast (static_cast (l)->Next); } return static_cast (0); /* static analysis guarentees a RETURN statement will be used before here. */ @@ -250,9 +247,9 @@ extern "C" unsigned int Lists_GetIndexOfList (Lists_List l, unsigned int c) else { i = 1; - while (i <= l->NoOfElements) + while (i <= static_cast (l)->NoOfElements) { - if (l->Elements.array[i-1] == c) + if (static_cast (l)->Elements.array[i-1] == c) { return i; } @@ -261,7 +258,7 @@ extern "C" unsigned int Lists_GetIndexOfList (Lists_List l, unsigned int c) i += 1; } } - return l->NoOfElements+(Lists_GetIndexOfList (l->Next, c)); + return static_cast (l)->NoOfElements+(Lists_GetIndexOfList (static_cast (static_cast (l)->Next), c)); } /* static analysis guarentees a RETURN statement will be used before here. */ __builtin_unreachable (); @@ -285,8 +282,8 @@ extern "C" unsigned int Lists_NoOfItemsInList (Lists_List l) { t = 0; do { - t += l->NoOfElements; - l = l->Next; + t += static_cast (l)->NoOfElements; + l = static_cast (static_cast (l)->Next); } while (! (l == NULL)); return t; } @@ -316,33 +313,33 @@ extern "C" void Lists_IncludeItemIntoList (Lists_List l, unsigned int c) extern "C" void Lists_RemoveItemFromList (Lists_List l, unsigned int c) { - Lists_List p; + Lists_List__opaque p; unsigned int i; bool Found; if (l != NULL) { Found = false; - p = NULL; + p = static_cast (NULL); do { i = 1; - while ((i <= l->NoOfElements) && (l->Elements.array[i-1] != c)) + while ((i <= static_cast (l)->NoOfElements) && (static_cast (l)->Elements.array[i-1] != c)) { i += 1; } - if ((i <= l->NoOfElements) && (l->Elements.array[i-1] == c)) + if ((i <= static_cast (l)->NoOfElements) && (static_cast (l)->Elements.array[i-1] == c)) { Found = true; } else { - p = l; - l = l->Next; + p = static_cast (l); + l = static_cast (static_cast (l)->Next); } } while (! ((l == NULL) || Found)); if (Found) { - RemoveItem (p, l, i); + RemoveItem (p, static_cast (l), i); } } } @@ -358,9 +355,9 @@ extern "C" bool Lists_IsItemInList (Lists_List l, unsigned int c) do { i = 1; - while (i <= l->NoOfElements) + while (i <= static_cast (l)->NoOfElements) { - if (l->Elements.array[i-1] == c) + if (static_cast (l)->Elements.array[i-1] == c) { return true; } @@ -369,7 +366,7 @@ extern "C" bool Lists_IsItemInList (Lists_List l, unsigned int c) i += 1; } } - l = l->Next; + l = static_cast (static_cast (l)->Next); } while (! (l == NULL)); return false; /* static analysis guarentees a RETURN statement will be used before here. */ @@ -402,19 +399,19 @@ extern "C" void Lists_ForeachItemInListDo (Lists_List l, SymbolKey_PerformOperat extern "C" Lists_List Lists_DuplicateList (Lists_List l) { - Lists_List m; + Lists_List__opaque m; unsigned int n; unsigned int i; - Lists_InitList (&m); + Lists_InitList (reinterpret_cast (&m)); n = Lists_NoOfItemsInList (l); i = 1; while (i <= n) { - Lists_PutItemIntoList (m, Lists_GetItemFromList (l, i)); + Lists_PutItemIntoList (static_cast (m), Lists_GetItemFromList (l, i)); i += 1; } - return m; + return static_cast (m); /* static analysis guarentees a RETURN statement will be used before here. */ __builtin_unreachable (); } diff --git a/gcc/m2/pge-boot/GLists.h b/gcc/m2/pge-boot/GLists.h index e9680057328..0d92571444e 100644 --- a/gcc/m2/pge-boot/GLists.h +++ b/gcc/m2/pge-boot/GLists.h @@ -24,8 +24,6 @@ along with GNU Modula-2; see the file COPYING3. If not see #if !defined (_Lists_H) # define _Lists_H -#include "config.h" -#include "system.h" # ifdef __cplusplus extern "C" { # endif diff --git a/gcc/m2/pge-boot/GM2Dependent.cc b/gcc/m2/pge-boot/GM2Dependent.cc index 89c80832889..c221786011c 100644 --- a/gcc/m2/pge-boot/GM2Dependent.cc +++ b/gcc/m2/pge-boot/GM2Dependent.cc @@ -50,9 +50,9 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see # undef NULL # define NULL 0 #endif -#define _M2Dependent_H #define _M2Dependent_C +#include "GM2Dependent.h" # include "Glibc.h" # include "GASCII.h" # include "GSYSTEM.h" @@ -79,9 +79,6 @@ typedef struct M2Dependent__T4_a M2Dependent__T4; typedef enum {M2Dependent_unregistered, M2Dependent_unordered, M2Dependent_started, M2Dependent_ordered, M2Dependent_user} M2Dependent_DependencyState; -typedef void (*M2Dependent_ArgCVEnvP_t) (int, void *, void *); -struct M2Dependent_ArgCVEnvP_p { M2Dependent_ArgCVEnvP_t proc; }; - struct M2Dependent_DependencyList_r { PROC proc; bool forced; @@ -641,11 +638,11 @@ static void toCString (char *str, unsigned int _str_high) { if (str[i+1] == 'n') { - str[i] = ASCII_nl; + const_cast(str)[i] = ASCII_nl; j = i+1; while (j < high) { - str[j] = str[j+1]; + const_cast(str)[j] = str[j+1]; j += 1; } } @@ -965,7 +962,7 @@ static void DisplayModuleInfo (M2Dependent_DependencyState state, const char *de if (Modules.array[state-M2Dependent_unregistered] != NULL) { - libc_printf ((const char *) "%s modules\\n", 12, &desc); + libc_printf ((const char *) "%s modules\\n", 12, const_cast (static_cast(desc))); mptr = Modules.array[state-M2Dependent_unregistered]; count = 0; do { @@ -1214,7 +1211,7 @@ static bool equal (void * cstr, const char *str_, unsigned int _str_high) /* make a local copy of each unbounded array. */ memcpy (str, str_, _str_high+1); - return (strncmp (reinterpret_cast (cstr), reinterpret_cast (&str), StrLib_StrLen ((const char *) str, _str_high))) == 0; + return (strncmp (reinterpret_cast (cstr), reinterpret_cast (const_cast (static_cast(str))), StrLib_StrLen ((const char *) str, _str_high))) == 0; /* static analysis guarentees a RETURN statement will be used before here. */ __builtin_unreachable (); } @@ -1252,7 +1249,7 @@ static void SetupDebugFlags (void) ForceTrace = false; HexTrace = false; WarningTrace = false; - pc = static_cast (libc_getenv (const_cast (reinterpret_cast("GCC_M2LINK_RTFLAG")))); + pc = static_cast (libc_getenv (const_cast (static_cast("GCC_M2LINK_RTFLAG")))); while ((pc != NULL) && ((*pc) != ASCII_nul)) { if (equal (reinterpret_cast (pc), (const char *) "all", 3)) diff --git a/gcc/m2/pge-boot/GM2Dependent.h b/gcc/m2/pge-boot/GM2Dependent.h index 0353236f8c1..29c61f69509 100644 --- a/gcc/m2/pge-boot/GM2Dependent.h +++ b/gcc/m2/pge-boot/GM2Dependent.h @@ -29,8 +29,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_M2Dependent_H) # define _M2Dependent_H -#include "config.h" -#include "system.h" # ifdef __cplusplus extern "C" { # endif diff --git a/gcc/m2/pge-boot/GM2EXCEPTION.cc b/gcc/m2/pge-boot/GM2EXCEPTION.cc index 274f29a9553..e9fc91b0ad0 100644 --- a/gcc/m2/pge-boot/GM2EXCEPTION.cc +++ b/gcc/m2/pge-boot/GM2EXCEPTION.cc @@ -34,14 +34,12 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #include # include "Gmcrts.h" -#define _M2EXCEPTION_H #define _M2EXCEPTION_C +#include "GM2EXCEPTION.h" # include "GSYSTEM.h" # include "GRTExceptions.h" -typedef enum {M2EXCEPTION_indexException, M2EXCEPTION_rangeException, M2EXCEPTION_caseSelectException, M2EXCEPTION_invalidLocation, M2EXCEPTION_functionException, M2EXCEPTION_wholeValueException, M2EXCEPTION_wholeDivException, M2EXCEPTION_realValueException, M2EXCEPTION_realDivException, M2EXCEPTION_complexValueException, M2EXCEPTION_complexDivException, M2EXCEPTION_protException, M2EXCEPTION_sysException, M2EXCEPTION_coException, M2EXCEPTION_exException} M2EXCEPTION_M2Exceptions; - extern "C" M2EXCEPTION_M2Exceptions M2EXCEPTION_M2Exception (void); extern "C" bool M2EXCEPTION_IsM2Exception (void); @@ -57,7 +55,7 @@ extern "C" M2EXCEPTION_M2Exceptions M2EXCEPTION_M2Exception (void) n = RTExceptions_GetNumber (e); if (n == (UINT_MAX)) { - RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_exException)), const_cast (reinterpret_cast("../../gcc/m2/gm2-libs/M2EXCEPTION.mod")), 47, 6, const_cast (reinterpret_cast("M2Exception")), const_cast (reinterpret_cast("current coroutine is not in the exceptional execution state"))); + RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_exException)), const_cast (static_cast("../../gcc/m2/gm2-libs/M2EXCEPTION.mod")), 47, 6, const_cast (static_cast("M2Exception")), const_cast (static_cast("current coroutine is not in the exceptional execution state"))); } else { diff --git a/gcc/m2/pge-boot/GM2EXCEPTION.h b/gcc/m2/pge-boot/GM2EXCEPTION.h index 4ee5404733c..5fd59cfa0a6 100644 --- a/gcc/m2/pge-boot/GM2EXCEPTION.h +++ b/gcc/m2/pge-boot/GM2EXCEPTION.h @@ -29,8 +29,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_M2EXCEPTION_H) # define _M2EXCEPTION_H -#include "config.h" -#include "system.h" # ifdef __cplusplus extern "C" { # endif diff --git a/gcc/m2/pge-boot/GM2RTS.cc b/gcc/m2/pge-boot/GM2RTS.cc index ef5f7cf5ce1..761bb824b37 100644 --- a/gcc/m2/pge-boot/GM2RTS.cc +++ b/gcc/m2/pge-boot/GM2RTS.cc @@ -25,8 +25,6 @@ a copy of the GCC Runtime Library Exception along with this program; see the files COPYING3 and COPYING.RUNTIME respectively. If not, see . */ -#include "config.h" -#include "system.h" #include # if !defined (PROC_D) # define PROC_D @@ -42,6 +40,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see # define FALSE (1==0) # endif +#include +#include +#include +#include #define _M2RTS_C #include "GM2RTS.h" @@ -133,7 +135,7 @@ extern "C" void M2RTS_ExecuteTerminationProcedures (void); not call ExecuteTerminationProcedures. */ -extern "C" void M2RTS_Terminate (void) __attribute__ ((noreturn)); +extern "C" void M2RTS_Terminate (void); /* HALT - terminate the current program. The procedure @@ -146,7 +148,7 @@ extern "C" void M2RTS_Terminate (void) __attribute__ ((noreturn)); then calling HALT with no parameter. */ -extern "C" void M2RTS_HALT (int exitcode) __attribute__ ((noreturn)); +extern "C" void M2RTS_HALT (int exitcode); /* Halt - provides a more user friendly version of HALT, which takes @@ -154,7 +156,7 @@ extern "C" void M2RTS_HALT (int exitcode) __attribute__ ((noreturn)); to stderr and calls exit (1). */ -extern "C" void M2RTS_Halt (const char *description_, unsigned int _description_high, const char *filename_, unsigned int _filename_high, const char *function_, unsigned int _function_high, unsigned int line) __attribute__ ((noreturn)); +extern "C" void M2RTS_Halt (const char *description_, unsigned int _description_high, const char *filename_, unsigned int _filename_high, const char *function_, unsigned int _function_high, unsigned int line); /* HaltC - provides a more user friendly version of HALT, which takes @@ -162,7 +164,7 @@ extern "C" void M2RTS_Halt (const char *description_, unsigned int _description_ to stderr and calls exit (1). */ -extern "C" void M2RTS_HaltC (void * description, void * filename, void * function, unsigned int line) __attribute__ ((noreturn)); +extern "C" void M2RTS_HaltC (void * description, void * filename, void * function, unsigned int line); /* ExitOnHalt - if HALT is executed then call exit with the exit code, e. @@ -174,7 +176,7 @@ extern "C" void M2RTS_ExitOnHalt (int e); ErrorMessage - emits an error message to stderr and then calls exit (1). */ -extern "C" void M2RTS_ErrorMessage (const char *message_, unsigned int _message_high, const char *filename_, unsigned int _filename_high, unsigned int line, const char *function_, unsigned int _function_high) __attribute__ ((noreturn)); +extern "C" void M2RTS_ErrorMessage (const char *message_, unsigned int _message_high, const char *filename_, unsigned int _filename_high, unsigned int line, const char *function_, unsigned int _function_high); /* Length - returns the length of a string, a. This is called whenever @@ -183,30 +185,30 @@ extern "C" void M2RTS_ErrorMessage (const char *message_, unsigned int _message_ */ extern "C" unsigned int M2RTS_Length (const char *a_, unsigned int _a_high); -extern "C" void M2RTS_AssignmentException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn)); -extern "C" void M2RTS_ReturnException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn)); -extern "C" void M2RTS_IncException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn)); -extern "C" void M2RTS_DecException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn)); -extern "C" void M2RTS_InclException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn)); -extern "C" void M2RTS_ExclException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn)); -extern "C" void M2RTS_ShiftException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn)); -extern "C" void M2RTS_RotateException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn)); -extern "C" void M2RTS_StaticArraySubscriptException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn)); -extern "C" void M2RTS_DynamicArraySubscriptException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn)); -extern "C" void M2RTS_ForLoopBeginException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn)); -extern "C" void M2RTS_ForLoopToException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn)); -extern "C" void M2RTS_ForLoopEndException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn)); -extern "C" void M2RTS_PointerNilException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn)); -extern "C" void M2RTS_NoReturnException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn)); -extern "C" void M2RTS_CaseException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn)); -extern "C" void M2RTS_WholeNonPosDivException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn)); -extern "C" void M2RTS_WholeNonPosModException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn)); -extern "C" void M2RTS_WholeZeroDivException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn)); -extern "C" void M2RTS_WholeZeroRemException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn)); -extern "C" void M2RTS_WholeValueException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn)); -extern "C" void M2RTS_RealValueException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn)); -extern "C" void M2RTS_ParameterException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn)); -extern "C" void M2RTS_NoException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn)); +extern "C" void M2RTS_AssignmentException (void * filename, unsigned int line, unsigned int column, void * scope, void * message); +extern "C" void M2RTS_ReturnException (void * filename, unsigned int line, unsigned int column, void * scope, void * message); +extern "C" void M2RTS_IncException (void * filename, unsigned int line, unsigned int column, void * scope, void * message); +extern "C" void M2RTS_DecException (void * filename, unsigned int line, unsigned int column, void * scope, void * message); +extern "C" void M2RTS_InclException (void * filename, unsigned int line, unsigned int column, void * scope, void * message); +extern "C" void M2RTS_ExclException (void * filename, unsigned int line, unsigned int column, void * scope, void * message); +extern "C" void M2RTS_ShiftException (void * filename, unsigned int line, unsigned int column, void * scope, void * message); +extern "C" void M2RTS_RotateException (void * filename, unsigned int line, unsigned int column, void * scope, void * message); +extern "C" void M2RTS_StaticArraySubscriptException (void * filename, unsigned int line, unsigned int column, void * scope, void * message); +extern "C" void M2RTS_DynamicArraySubscriptException (void * filename, unsigned int line, unsigned int column, void * scope, void * message); +extern "C" void M2RTS_ForLoopBeginException (void * filename, unsigned int line, unsigned int column, void * scope, void * message); +extern "C" void M2RTS_ForLoopToException (void * filename, unsigned int line, unsigned int column, void * scope, void * message); +extern "C" void M2RTS_ForLoopEndException (void * filename, unsigned int line, unsigned int column, void * scope, void * message); +extern "C" void M2RTS_PointerNilException (void * filename, unsigned int line, unsigned int column, void * scope, void * message); +extern "C" void M2RTS_NoReturnException (void * filename, unsigned int line, unsigned int column, void * scope, void * message); +extern "C" void M2RTS_CaseException (void * filename, unsigned int line, unsigned int column, void * scope, void * message); +extern "C" void M2RTS_WholeNonPosDivException (void * filename, unsigned int line, unsigned int column, void * scope, void * message); +extern "C" void M2RTS_WholeNonPosModException (void * filename, unsigned int line, unsigned int column, void * scope, void * message); +extern "C" void M2RTS_WholeZeroDivException (void * filename, unsigned int line, unsigned int column, void * scope, void * message); +extern "C" void M2RTS_WholeZeroRemException (void * filename, unsigned int line, unsigned int column, void * scope, void * message); +extern "C" void M2RTS_WholeValueException (void * filename, unsigned int line, unsigned int column, void * scope, void * message); +extern "C" void M2RTS_RealValueException (void * filename, unsigned int line, unsigned int column, void * scope, void * message); +extern "C" void M2RTS_ParameterException (void * filename, unsigned int line, unsigned int column, void * scope, void * message); +extern "C" void M2RTS_NoException (void * filename, unsigned int line, unsigned int column, void * scope, void * message); /* ErrorString - writes a string to stderr. @@ -224,7 +226,7 @@ static void ErrorStringC (void * str); ErrorMessageC - emits an error message to stderr and then calls exit (1). */ -static void ErrorMessageC (void * message, void * filename, unsigned int line, void * function) __attribute__ ((noreturn)); +static void ErrorMessageC (void * message, void * filename, unsigned int line, void * function); /* Init - initialize the initial, terminate procedure lists and booleans. diff --git a/gcc/m2/pge-boot/GM2RTS.h b/gcc/m2/pge-boot/GM2RTS.h index 055cc95675b..df0367808be 100644 --- a/gcc/m2/pge-boot/GM2RTS.h +++ b/gcc/m2/pge-boot/GM2RTS.h @@ -29,8 +29,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_M2RTS_H) # define _M2RTS_H -#include "config.h" -#include "system.h" # ifdef __cplusplus extern "C" { # endif diff --git a/gcc/m2/pge-boot/GNameKey.cc b/gcc/m2/pge-boot/GNameKey.cc index 52b90a03cf6..98bb148cc43 100644 --- a/gcc/m2/pge-boot/GNameKey.cc +++ b/gcc/m2/pge-boot/GNameKey.cc @@ -44,9 +44,9 @@ along with GNU Modula-2; see the file COPYING3. If not see # undef NULL # define NULL 0 #endif -#define _NameKey_H #define _NameKey_C +#include "GNameKey.h" # include "GSYSTEM.h" # include "GStorage.h" # include "GIndexing.h" @@ -401,13 +401,13 @@ extern "C" void NameKey_GetKey (NameKey_Name key, char *a, unsigned int _a_high) higha = _a_high; while (((p != NULL) && (i <= higha)) && ((*p) != ASCII_nul)) { - a[i] = (*p); + const_cast(a)[i] = (*p); p += 1; i += 1; } if (i <= higha) { - a[i] = ASCII_nul; + const_cast(a)[i] = ASCII_nul; } } diff --git a/gcc/m2/pge-boot/GNameKey.h b/gcc/m2/pge-boot/GNameKey.h index bb003f79d38..fc80892eaca 100644 --- a/gcc/m2/pge-boot/GNameKey.h +++ b/gcc/m2/pge-boot/GNameKey.h @@ -24,8 +24,6 @@ along with GNU Modula-2; see the file COPYING3. If not see #if !defined (_NameKey_H) # define _NameKey_H -#include "config.h" -#include "system.h" # ifdef __cplusplus extern "C" { # endif diff --git a/gcc/m2/pge-boot/GNumberIO.cc b/gcc/m2/pge-boot/GNumberIO.cc index 04e9d3cb084..f6a8b6fb3f9 100644 --- a/gcc/m2/pge-boot/GNumberIO.cc +++ b/gcc/m2/pge-boot/GNumberIO.cc @@ -43,9 +43,9 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #include #include #include -#define _NumberIO_H #define _NumberIO_C +#include "GNumberIO.h" # include "GASCII.h" # include "GStrIO.h" # include "GStrLib.h" @@ -173,19 +173,19 @@ extern "C" void NumberIO_CardToStr (unsigned int x, unsigned int n, char *a, uns Higha = _a_high; while ((n > i) && (j <= Higha)) { - a[j] = ' '; + const_cast(a)[j] = ' '; j += 1; n -= 1; } while ((i > 0) && (j <= Higha)) { - a[j] = ((char) (buf.array[i-1]+ ((unsigned int) ('0')))); + const_cast(a)[j] = ((char) (buf.array[i-1]+ ((unsigned int) ('0')))); j += 1; i -= 1; } if (j <= Higha) { - a[j] = ASCII_nul; + const_cast(a)[j] = ASCII_nul; } } @@ -271,7 +271,7 @@ extern "C" void NumberIO_HexToStr (unsigned int x, unsigned int n, char *a, unsi Higha = _a_high; while ((n > i) && (j <= Higha)) { - a[j] = '0'; + const_cast(a)[j] = '0'; j += 1; n -= 1; } @@ -279,18 +279,18 @@ extern "C" void NumberIO_HexToStr (unsigned int x, unsigned int n, char *a, unsi { if (buf.array[i-1] < 10) { - a[j] = ((char) (buf.array[i-1]+ ((unsigned int) ('0')))); + const_cast(a)[j] = ((char) (buf.array[i-1]+ ((unsigned int) ('0')))); } else { - a[j] = ((char) ((buf.array[i-1]+ ((unsigned int) ('A')))-10)); + const_cast(a)[j] = ((char) ((buf.array[i-1]+ ((unsigned int) ('A')))-10)); } j += 1; i -= 1; } if (j <= Higha) { - a[j] = ASCII_nul; + const_cast(a)[j] = ASCII_nul; } } @@ -350,24 +350,24 @@ extern "C" void NumberIO_IntToStr (int x, unsigned int n, char *a, unsigned int Higha = _a_high; while ((n > i) && (j <= Higha)) { - a[j] = ' '; + const_cast(a)[j] = ' '; j += 1; n -= 1; } if (Negative) { - a[j] = '-'; + const_cast(a)[j] = '-'; j += 1; } while ((i != 0) && (j <= Higha)) { - a[j] = ((char) (buf.array[i-1]+ ((unsigned int) ('0')))); + const_cast(a)[j] = ((char) (buf.array[i-1]+ ((unsigned int) ('0')))); j += 1; i -= 1; } if (j <= Higha) { - a[j] = ASCII_nul; + const_cast(a)[j] = ASCII_nul; } } @@ -491,19 +491,19 @@ extern "C" void NumberIO_OctToStr (unsigned int x, unsigned int n, char *a, unsi Higha = _a_high; while ((n > i) && (j <= Higha)) { - a[j] = ' '; + const_cast(a)[j] = ' '; j += 1; n -= 1; } while ((i > 0) && (j <= Higha)) { - a[j] = ((char) (buf.array[i-1]+ ((unsigned int) ('0')))); + const_cast(a)[j] = ((char) (buf.array[i-1]+ ((unsigned int) ('0')))); j += 1; i -= 1; } if (j <= Higha) { - a[j] = ASCII_nul; + const_cast(a)[j] = ASCII_nul; } } @@ -568,19 +568,19 @@ extern "C" void NumberIO_BinToStr (unsigned int x, unsigned int n, char *a, unsi Higha = _a_high; while ((n > i) && (j <= Higha)) { - a[j] = ' '; + const_cast(a)[j] = ' '; j += 1; n -= 1; } while ((i > 0) && (j <= Higha)) { - a[j] = ((char) (buf.array[i-1]+ ((unsigned int) ('0')))); + const_cast(a)[j] = ((char) (buf.array[i-1]+ ((unsigned int) ('0')))); j += 1; i -= 1; } if (j <= Higha) { - a[j] = ASCII_nul; + const_cast(a)[j] = ASCII_nul; } } diff --git a/gcc/m2/pge-boot/GNumberIO.h b/gcc/m2/pge-boot/GNumberIO.h index 34aee337383..3da6f1aa971 100644 --- a/gcc/m2/pge-boot/GNumberIO.h +++ b/gcc/m2/pge-boot/GNumberIO.h @@ -29,8 +29,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_NumberIO_H) # define _NumberIO_H -#include "config.h" -#include "system.h" # ifdef __cplusplus extern "C" { # endif diff --git a/gcc/m2/pge-boot/GOutput.cc b/gcc/m2/pge-boot/GOutput.cc index f6d85004899..c4f4705efab 100644 --- a/gcc/m2/pge-boot/GOutput.cc +++ b/gcc/m2/pge-boot/GOutput.cc @@ -42,9 +42,9 @@ along with GNU Modula-2; see the file COPYING3. If not see # undef NULL # define NULL 0 #endif -#define _Output_H #define _Output_C +#include "GOutput.h" # include "GFIO.h" # include "GSFIO.h" # include "GStrLib.h" diff --git a/gcc/m2/pge-boot/GOutput.h b/gcc/m2/pge-boot/GOutput.h index 79feda8f790..c95c77d5164 100644 --- a/gcc/m2/pge-boot/GOutput.h +++ b/gcc/m2/pge-boot/GOutput.h @@ -24,8 +24,6 @@ along with GNU Modula-2; see the file COPYING3. If not see #if !defined (_Output_H) # define _Output_H -#include "config.h" -#include "system.h" # ifdef __cplusplus extern "C" { # endif diff --git a/gcc/m2/pge-boot/GPushBackInput.cc b/gcc/m2/pge-boot/GPushBackInput.cc index 6fb0fbea9d3..eed28e2d9cc 100644 --- a/gcc/m2/pge-boot/GPushBackInput.cc +++ b/gcc/m2/pge-boot/GPushBackInput.cc @@ -43,9 +43,9 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see # undef NULL # define NULL 0 #endif -#define _PushBackInput_H #define _PushBackInput_C +#include "GPushBackInput.h" # include "GFIO.h" # include "GDynamicStrings.h" # include "GASCII.h" diff --git a/gcc/m2/pge-boot/GPushBackInput.h b/gcc/m2/pge-boot/GPushBackInput.h index 076b99657a0..7b441796c8e 100644 --- a/gcc/m2/pge-boot/GPushBackInput.h +++ b/gcc/m2/pge-boot/GPushBackInput.h @@ -29,8 +29,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_PushBackInput_H) # define _PushBackInput_H -#include "config.h" -#include "system.h" # ifdef __cplusplus extern "C" { # endif diff --git a/gcc/m2/pge-boot/GRTExceptions.cc b/gcc/m2/pge-boot/GRTExceptions.cc index 2b6557eb7be..b4ebe6d2a45 100644 --- a/gcc/m2/pge-boot/GRTExceptions.cc +++ b/gcc/m2/pge-boot/GRTExceptions.cc @@ -50,9 +50,9 @@ extern void throw (unsigned int); # undef NULL # define NULL 0 #endif -#define _RTExceptions_H #define _RTExceptions_C +#include "GRTExceptions.h" # include "GASCII.h" # include "GStrLib.h" # include "GStorage.h" @@ -75,17 +75,14 @@ typedef struct RTExceptions__T3_r RTExceptions__T3; typedef RTExceptions__T3 *RTExceptions_Handler; -typedef RTExceptions__T1 *RTExceptions_EHBlock; - -typedef void (*RTExceptions_ProcedureHandler_t) (void); -struct RTExceptions_ProcedureHandler_p { RTExceptions_ProcedureHandler_t proc; }; +typedef RTExceptions__T1 *RTExceptions_EHBlock__opaque; struct RTExceptions__T2_a { char array[MaxBuffer+1]; }; struct RTExceptions__T1_r { RTExceptions__T2 buffer; unsigned int number; RTExceptions_Handler handlers; - RTExceptions_EHBlock right; + RTExceptions_EHBlock__opaque right; }; struct RTExceptions__T3_r { @@ -98,8 +95,8 @@ struct RTExceptions__T3_r { static bool inException; static RTExceptions_Handler freeHandler; -static RTExceptions_EHBlock freeEHB; -static RTExceptions_EHBlock currentEHB; +static RTExceptions_EHBlock__opaque freeEHB; +static RTExceptions_EHBlock__opaque currentEHB; static void * currentSource; /* @@ -236,7 +233,7 @@ static void ErrorString (const char *a_, unsigned int _a_high); findHandler - */ -static RTExceptions_Handler findHandler (RTExceptions_EHBlock e, unsigned int number); +static RTExceptions_Handler findHandler (RTExceptions_EHBlock__opaque e, unsigned int number); /* InvokeHandler - invokes the associated handler for the current @@ -289,7 +286,7 @@ static void addNum (unsigned int n, unsigned int *i); New - returns a new EHBlock. */ -static RTExceptions_EHBlock New (void); +static RTExceptions_EHBlock__opaque New (void); /* NewHandler - returns a new handler. @@ -325,7 +322,7 @@ static void SubHandler (RTExceptions_Handler h); AddHandler - add, e, to the end of the list of handlers. */ -static void AddHandler (RTExceptions_EHBlock e, RTExceptions_Handler h); +static void AddHandler (RTExceptions_EHBlock__opaque e, RTExceptions_Handler h); /* indexf - raise an index out of bounds exception. @@ -442,7 +439,7 @@ static void ErrorString (const char *a_, unsigned int _a_high) /* make a local copy of each unbounded array. */ memcpy (a, a_, _a_high+1); - n = static_cast (libc_write (2, &a, static_cast (StrLib_StrLen ((const char *) a, _a_high)))); + n = static_cast (libc_write (2, const_cast (static_cast(a)), static_cast (StrLib_StrLen ((const char *) a, _a_high)))); } @@ -450,7 +447,7 @@ static void ErrorString (const char *a_, unsigned int _a_high) findHandler - */ -static RTExceptions_Handler findHandler (RTExceptions_EHBlock e, unsigned int number) +static RTExceptions_Handler findHandler (RTExceptions_EHBlock__opaque e, unsigned int number) { RTExceptions_Handler h; @@ -543,7 +540,7 @@ static void * stripPath (void * s) p += 1; } } - return reinterpret_cast (f); + return static_cast (f); /* static analysis guarentees a RETURN statement will be used before here. */ __builtin_unreachable (); } @@ -608,9 +605,9 @@ static void addNum (unsigned int n, unsigned int *i) New - returns a new EHBlock. */ -static RTExceptions_EHBlock New (void) +static RTExceptions_EHBlock__opaque New (void) { - RTExceptions_EHBlock e; + RTExceptions_EHBlock__opaque e; if (freeEHB == NULL) { @@ -710,7 +707,7 @@ static void SubHandler (RTExceptions_Handler h) AddHandler - add, e, to the end of the list of handlers. */ -static void AddHandler (RTExceptions_EHBlock e, RTExceptions_Handler h) +static void AddHandler (RTExceptions_EHBlock__opaque e, RTExceptions_Handler h) { h->right = e->handlers; h->left = e->handlers->left; @@ -725,7 +722,7 @@ static void AddHandler (RTExceptions_EHBlock e, RTExceptions_Handler h) static void indexf (void * a) { - RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_indexException)), const_cast (reinterpret_cast("../../gcc/m2/gm2-libs/RTExceptions.mod")), 614, 9, const_cast (reinterpret_cast("indexf")), const_cast (reinterpret_cast("array index out of bounds"))); + RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_indexException)), const_cast (static_cast("../../gcc/m2/gm2-libs/RTExceptions.mod")), 614, 9, const_cast (static_cast("indexf")), const_cast (static_cast("array index out of bounds"))); } @@ -735,7 +732,7 @@ static void indexf (void * a) static void range (void * a) { - RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_rangeException)), const_cast (reinterpret_cast("../../gcc/m2/gm2-libs/RTExceptions.mod")), 626, 9, const_cast (reinterpret_cast("range")), const_cast (reinterpret_cast("assignment out of range"))); + RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_rangeException)), const_cast (static_cast("../../gcc/m2/gm2-libs/RTExceptions.mod")), 626, 9, const_cast (static_cast("range")), const_cast (static_cast("assignment out of range"))); } @@ -745,7 +742,7 @@ static void range (void * a) static void casef (void * a) { - RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_caseSelectException)), const_cast (reinterpret_cast("../../gcc/m2/gm2-libs/RTExceptions.mod")), 638, 9, const_cast (reinterpret_cast("casef")), const_cast (reinterpret_cast("case selector out of range"))); + RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_caseSelectException)), const_cast (static_cast("../../gcc/m2/gm2-libs/RTExceptions.mod")), 638, 9, const_cast (static_cast("casef")), const_cast (static_cast("case selector out of range"))); } @@ -755,7 +752,7 @@ static void casef (void * a) static void invalidloc (void * a) { - RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_invalidLocation)), const_cast (reinterpret_cast("../../gcc/m2/gm2-libs/RTExceptions.mod")), 650, 9, const_cast (reinterpret_cast("invalidloc")), const_cast (reinterpret_cast("invalid address referenced"))); + RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_invalidLocation)), const_cast (static_cast("../../gcc/m2/gm2-libs/RTExceptions.mod")), 650, 9, const_cast (static_cast("invalidloc")), const_cast (static_cast("invalid address referenced"))); } @@ -765,7 +762,7 @@ static void invalidloc (void * a) static void function (void * a) { - RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_functionException)), const_cast (reinterpret_cast("../../gcc/m2/gm2-libs/RTExceptions.mod")), 662, 9, const_cast (reinterpret_cast("function")), const_cast (reinterpret_cast("... function ... "))); /* --fixme-- what has happened ? */ + RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_functionException)), const_cast (static_cast("../../gcc/m2/gm2-libs/RTExceptions.mod")), 662, 9, const_cast (static_cast("function")), const_cast (static_cast("... function ... "))); /* --fixme-- what has happened ? */ } @@ -775,7 +772,7 @@ static void function (void * a) static void wholevalue (void * a) { - RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_wholeValueException)), const_cast (reinterpret_cast("../../gcc/m2/gm2-libs/RTExceptions.mod")), 674, 9, const_cast (reinterpret_cast("wholevalue")), const_cast (reinterpret_cast("illegal whole value exception"))); + RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_wholeValueException)), const_cast (static_cast("../../gcc/m2/gm2-libs/RTExceptions.mod")), 674, 9, const_cast (static_cast("wholevalue")), const_cast (static_cast("illegal whole value exception"))); } @@ -785,7 +782,7 @@ static void wholevalue (void * a) static void wholediv (void * a) { - RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_wholeDivException)), const_cast (reinterpret_cast("../../gcc/m2/gm2-libs/RTExceptions.mod")), 686, 9, const_cast (reinterpret_cast("wholediv")), const_cast (reinterpret_cast("illegal whole value exception"))); + RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_wholeDivException)), const_cast (static_cast("../../gcc/m2/gm2-libs/RTExceptions.mod")), 686, 9, const_cast (static_cast("wholediv")), const_cast (static_cast("illegal whole value exception"))); } @@ -795,7 +792,7 @@ static void wholediv (void * a) static void realvalue (void * a) { - RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_realValueException)), const_cast (reinterpret_cast("../../gcc/m2/gm2-libs/RTExceptions.mod")), 698, 9, const_cast (reinterpret_cast("realvalue")), const_cast (reinterpret_cast("illegal real value exception"))); + RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_realValueException)), const_cast (static_cast("../../gcc/m2/gm2-libs/RTExceptions.mod")), 698, 9, const_cast (static_cast("realvalue")), const_cast (static_cast("illegal real value exception"))); } @@ -805,7 +802,7 @@ static void realvalue (void * a) static void realdiv (void * a) { - RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_realDivException)), const_cast (reinterpret_cast("../../gcc/m2/gm2-libs/RTExceptions.mod")), 710, 9, const_cast (reinterpret_cast("realdiv")), const_cast (reinterpret_cast("real number division by zero exception"))); + RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_realDivException)), const_cast (static_cast("../../gcc/m2/gm2-libs/RTExceptions.mod")), 710, 9, const_cast (static_cast("realdiv")), const_cast (static_cast("real number division by zero exception"))); } @@ -815,7 +812,7 @@ static void realdiv (void * a) static void complexvalue (void * a) { - RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_complexValueException)), const_cast (reinterpret_cast("../../gcc/m2/gm2-libs/RTExceptions.mod")), 722, 9, const_cast (reinterpret_cast("complexvalue")), const_cast (reinterpret_cast("illegal complex value exception"))); + RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_complexValueException)), const_cast (static_cast("../../gcc/m2/gm2-libs/RTExceptions.mod")), 722, 9, const_cast (static_cast("complexvalue")), const_cast (static_cast("illegal complex value exception"))); } @@ -825,7 +822,7 @@ static void complexvalue (void * a) static void complexdiv (void * a) { - RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_complexDivException)), const_cast (reinterpret_cast("../../gcc/m2/gm2-libs/RTExceptions.mod")), 734, 9, const_cast (reinterpret_cast("complexdiv")), const_cast (reinterpret_cast("complex number division by zero exception"))); + RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_complexDivException)), const_cast (static_cast("../../gcc/m2/gm2-libs/RTExceptions.mod")), 734, 9, const_cast (static_cast("complexdiv")), const_cast (static_cast("complex number division by zero exception"))); } @@ -835,7 +832,7 @@ static void complexdiv (void * a) static void protection (void * a) { - RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_protException)), const_cast (reinterpret_cast("../../gcc/m2/gm2-libs/RTExceptions.mod")), 746, 9, const_cast (reinterpret_cast("protection")), const_cast (reinterpret_cast("protection exception"))); + RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_protException)), const_cast (static_cast("../../gcc/m2/gm2-libs/RTExceptions.mod")), 746, 9, const_cast (static_cast("protection")), const_cast (static_cast("protection exception"))); } @@ -845,7 +842,7 @@ static void protection (void * a) static void systemf (void * a) { - RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_sysException)), const_cast (reinterpret_cast("../../gcc/m2/gm2-libs/RTExceptions.mod")), 758, 9, const_cast (reinterpret_cast("systemf")), const_cast (reinterpret_cast("system exception"))); + RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_sysException)), const_cast (static_cast("../../gcc/m2/gm2-libs/RTExceptions.mod")), 758, 9, const_cast (static_cast("systemf")), const_cast (static_cast("system exception"))); } @@ -855,7 +852,7 @@ static void systemf (void * a) static void coroutine (void * a) { - RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_coException)), const_cast (reinterpret_cast("../../gcc/m2/gm2-libs/RTExceptions.mod")), 770, 9, const_cast (reinterpret_cast("coroutine")), const_cast (reinterpret_cast("coroutine exception"))); + RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_coException)), const_cast (static_cast("../../gcc/m2/gm2-libs/RTExceptions.mod")), 770, 9, const_cast (static_cast("coroutine")), const_cast (static_cast("coroutine exception"))); } @@ -865,7 +862,7 @@ static void coroutine (void * a) static void exception (void * a) { - RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_exException)), const_cast (reinterpret_cast("../../gcc/m2/gm2-libs/RTExceptions.mod")), 782, 9, const_cast (reinterpret_cast("exception")), const_cast (reinterpret_cast("exception exception"))); + RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_exException)), const_cast (static_cast("../../gcc/m2/gm2-libs/RTExceptions.mod")), 782, 9, const_cast (static_cast("exception")), const_cast (static_cast("exception exception"))); } @@ -877,8 +874,8 @@ static void Init (void) { inException = false; freeHandler = NULL; - freeEHB = NULL; - currentEHB = RTExceptions_InitExceptionBlock (); + freeEHB = static_cast (NULL); + currentEHB = static_cast (RTExceptions_InitExceptionBlock ()); currentSource = NULL; RTExceptions_BaseExceptionsThrow (); SysExceptions_InitExceptionHandlers ((SysExceptions_PROCEXCEPTION) {(SysExceptions_PROCEXCEPTION_t) indexf}, (SysExceptions_PROCEXCEPTION) {(SysExceptions_PROCEXCEPTION_t) range}, (SysExceptions_PROCEXCEPTION) {(SysExceptions_PROCEXCEPTION_t) casef}, (SysExceptions_PROCEXCEPTION) {(SysExceptions_PROCEXCEPTION_t) invalidloc}, (SysExceptions_PROCEXCEPTION) {(SysExceptions_PROCEXCEPTION_t) function}, (SysExceptions_PROCEXCEPTION) {(SysExceptions_PROCEXCEPTION_t) wholevalue}, (SysExceptions_PROCEXCEPTION) {(SysExceptions_PROCEXCEPTION_t) wholediv}, (SysExceptions_PROCEXCEPTION) {(SysExceptions_PROCEXCEPTION_t) realvalue}, (SysExceptions_PROCEXCEPTION) {(SysExceptions_PROCEXCEPTION_t) realdiv}, (SysExceptions_PROCEXCEPTION) {(SysExceptions_PROCEXCEPTION_t) complexvalue}, (SysExceptions_PROCEXCEPTION) {(SysExceptions_PROCEXCEPTION_t) complexdiv}, (SysExceptions_PROCEXCEPTION) {(SysExceptions_PROCEXCEPTION_t) protection}, (SysExceptions_PROCEXCEPTION) {(SysExceptions_PROCEXCEPTION_t) systemf}, (SysExceptions_PROCEXCEPTION) {(SysExceptions_PROCEXCEPTION_t) coroutine}, (SysExceptions_PROCEXCEPTION) {(SysExceptions_PROCEXCEPTION_t) exception}); @@ -892,11 +889,11 @@ static void Init (void) static void TidyUp (void) { RTExceptions_Handler f; - RTExceptions_EHBlock e; + RTExceptions_EHBlock__opaque e; if (currentEHB != NULL) { - currentEHB = RTExceptions_KillExceptionBlock (currentEHB); + currentEHB = static_cast (RTExceptions_KillExceptionBlock (static_cast (currentEHB))); } while (freeHandler != NULL) { @@ -956,7 +953,7 @@ extern "C" void RTExceptions_Raise (unsigned int number, void * file, unsigned i extern "C" void RTExceptions_SetExceptionBlock (RTExceptions_EHBlock source) { - currentEHB = source; + currentEHB = static_cast (source); } @@ -966,7 +963,7 @@ extern "C" void RTExceptions_SetExceptionBlock (RTExceptions_EHBlock source) extern "C" RTExceptions_EHBlock RTExceptions_GetExceptionBlock (void) { - return currentEHB; + return static_cast (currentEHB); /* static analysis guarentees a RETURN statement will be used before here. */ __builtin_unreachable (); } @@ -978,7 +975,7 @@ extern "C" RTExceptions_EHBlock RTExceptions_GetExceptionBlock (void) extern "C" void * RTExceptions_GetTextBuffer (RTExceptions_EHBlock e) { - return &e->buffer; + return &static_cast (e)->buffer; /* static analysis guarentees a RETURN statement will be used before here. */ __builtin_unreachable (); } @@ -990,7 +987,7 @@ extern "C" void * RTExceptions_GetTextBuffer (RTExceptions_EHBlock e) extern "C" unsigned int RTExceptions_GetTextBufferSize (RTExceptions_EHBlock e) { - return sizeof (e->buffer); + return sizeof (static_cast (e)->buffer); /* static analysis guarentees a RETURN statement will be used before here. */ __builtin_unreachable (); } @@ -1003,7 +1000,7 @@ extern "C" unsigned int RTExceptions_GetTextBufferSize (RTExceptions_EHBlock e) extern "C" unsigned int RTExceptions_GetNumber (RTExceptions_EHBlock source) { - return source->number; + return static_cast (source)->number; /* static analysis guarentees a RETURN statement will be used before here. */ __builtin_unreachable (); } @@ -1015,7 +1012,7 @@ extern "C" unsigned int RTExceptions_GetNumber (RTExceptions_EHBlock source) extern "C" RTExceptions_EHBlock RTExceptions_InitExceptionBlock (void) { - RTExceptions_EHBlock e; + RTExceptions_EHBlock__opaque e; e = New (); e->number = UINT_MAX; @@ -1023,7 +1020,7 @@ extern "C" RTExceptions_EHBlock RTExceptions_InitExceptionBlock (void) e->handlers->right = e->handlers; /* add the dummy onto the head */ e->handlers->left = e->handlers; e->right = e; - return e; + return static_cast (e); /* static analysis guarentees a RETURN statement will be used before here. */ __builtin_unreachable (); } @@ -1035,10 +1032,10 @@ extern "C" RTExceptions_EHBlock RTExceptions_InitExceptionBlock (void) extern "C" RTExceptions_EHBlock RTExceptions_KillExceptionBlock (RTExceptions_EHBlock e) { - e->handlers = KillHandlers (e->handlers); - e->right = freeEHB; - freeEHB = e; - return NULL; + static_cast (e)->handlers = KillHandlers (static_cast (e)->handlers); + static_cast (e)->right = freeEHB; + freeEHB = static_cast (e); + return static_cast (NULL); /* static analysis guarentees a RETURN statement will be used before here. */ __builtin_unreachable (); } @@ -1053,7 +1050,7 @@ extern "C" void RTExceptions_PushHandler (RTExceptions_EHBlock e, unsigned int n RTExceptions_Handler h; RTExceptions_Handler i; - h = findHandler (e, number); + h = findHandler (static_cast (e), number); if (h == NULL) { i = InitHandler (NewHandler (), NULL, NULL, NULL, number, p); @@ -1066,7 +1063,7 @@ extern "C" void RTExceptions_PushHandler (RTExceptions_EHBlock e, unsigned int n i = InitHandler (NewHandler (), NULL, NULL, h, number, p); } /* add new handler */ - AddHandler (e, i); + AddHandler (static_cast (e), i); } @@ -1079,14 +1076,14 @@ extern "C" void RTExceptions_PopHandler (RTExceptions_EHBlock e, unsigned int nu { RTExceptions_Handler h; - h = findHandler (e, number); + h = findHandler (static_cast (e), number); if (h != NULL) { /* remove, h, */ SubHandler (h); if (h->stack != NULL) { - AddHandler (e, h->stack); + AddHandler (static_cast (e), h->stack); } h = KillHandler (h); } @@ -1101,11 +1098,11 @@ extern "C" void RTExceptions_PopHandler (RTExceptions_EHBlock e, unsigned int nu extern "C" void RTExceptions_DefaultErrorCatch (void) { - RTExceptions_EHBlock e; + RTExceptions_EHBlock__opaque e; int n; - e = RTExceptions_GetExceptionBlock (); - n = static_cast (libc_write (2, RTExceptions_GetTextBuffer (e), libc_strlen (RTExceptions_GetTextBuffer (e)))); + e = static_cast (RTExceptions_GetExceptionBlock ()); + n = static_cast (libc_write (2, RTExceptions_GetTextBuffer (static_cast (e)), libc_strlen (RTExceptions_GetTextBuffer (static_cast (e))))); M2RTS_HALT (-1); __builtin_unreachable (); } @@ -1187,7 +1184,7 @@ extern "C" RTExceptions_EHBlock RTExceptions_GetBaseExceptionBlock (void) } else { - return currentEHB; + return static_cast (currentEHB); } ReturnException ("../../gcc/m2/gm2-libs/RTExceptions.def", 25, 1); __builtin_unreachable (); diff --git a/gcc/m2/pge-boot/GRTExceptions.h b/gcc/m2/pge-boot/GRTExceptions.h index 9e188bcbad4..631a4acd4c7 100644 --- a/gcc/m2/pge-boot/GRTExceptions.h +++ b/gcc/m2/pge-boot/GRTExceptions.h @@ -29,8 +29,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_RTExceptions_H) # define _RTExceptions_H -#include "config.h" -#include "system.h" # ifdef __cplusplus extern "C" { # endif diff --git a/gcc/m2/pge-boot/GSArgs.h b/gcc/m2/pge-boot/GSArgs.h index a7b10bf4a1f..4fe04d725e9 100644 --- a/gcc/m2/pge-boot/GSArgs.h +++ b/gcc/m2/pge-boot/GSArgs.h @@ -29,8 +29,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_SArgs_H) # define _SArgs_H -#include "config.h" -#include "system.h" # ifdef __cplusplus extern "C" { # endif diff --git a/gcc/m2/pge-boot/GSEnvironment.h b/gcc/m2/pge-boot/GSEnvironment.h index ba607238f32..ccd96b7994d 100644 --- a/gcc/m2/pge-boot/GSEnvironment.h +++ b/gcc/m2/pge-boot/GSEnvironment.h @@ -29,6 +29,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_SEnvironment_H) # define _SEnvironment_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/pge-boot/GSFIO.cc b/gcc/m2/pge-boot/GSFIO.cc index 3c0dad0bc00..9d7c603baf0 100644 --- a/gcc/m2/pge-boot/GSFIO.cc +++ b/gcc/m2/pge-boot/GSFIO.cc @@ -37,9 +37,9 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see # undef NULL # define NULL 0 #endif -#define _SFIO_H #define _SFIO_C +#include "GSFIO.h" # include "GASCII.h" # include "GDynamicStrings.h" # include "GFIO.h" diff --git a/gcc/m2/pge-boot/GSFIO.h b/gcc/m2/pge-boot/GSFIO.h index 108d8ea79f0..2926596c7d7 100644 --- a/gcc/m2/pge-boot/GSFIO.h +++ b/gcc/m2/pge-boot/GSFIO.h @@ -29,8 +29,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_SFIO_H) # define _SFIO_H -#include "config.h" -#include "system.h" # ifdef __cplusplus extern "C" { # endif diff --git a/gcc/m2/pge-boot/GSYSTEM.h b/gcc/m2/pge-boot/GSYSTEM.h index a18a1765dc5..79f08c1868d 100644 --- a/gcc/m2/pge-boot/GSYSTEM.h +++ b/gcc/m2/pge-boot/GSYSTEM.h @@ -29,8 +29,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_SYSTEM_H) # define _SYSTEM_H -#include "config.h" -#include "system.h" # ifdef __cplusplus extern "C" { # endif diff --git a/gcc/m2/pge-boot/GScan.h b/gcc/m2/pge-boot/GScan.h index e059cdc6473..ed3e780612b 100644 --- a/gcc/m2/pge-boot/GScan.h +++ b/gcc/m2/pge-boot/GScan.h @@ -29,6 +29,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_Scan_H) # define _Scan_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/pge-boot/GStdIO.cc b/gcc/m2/pge-boot/GStdIO.cc index cf02566757d..689ed3b7f57 100644 --- a/gcc/m2/pge-boot/GStdIO.cc +++ b/gcc/m2/pge-boot/GStdIO.cc @@ -33,9 +33,9 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see # endif # include "Gmcrts.h" -#define _StdIO_H #define _StdIO_C +#include "GStdIO.h" # include "GIO.h" # include "GM2RTS.h" @@ -48,12 +48,6 @@ typedef struct StdIO__T1_a StdIO__T1; typedef struct StdIO__T2_a StdIO__T2; -typedef void (*StdIO_ProcWrite_t) (char); -struct StdIO_ProcWrite_p { StdIO_ProcWrite_t proc; }; - -typedef void (*StdIO_ProcRead_t) (char *); -struct StdIO_ProcRead_p { StdIO_ProcRead_t proc; }; - struct StdIO__T1_a { StdIO_ProcWrite array[MaxStack+1]; }; struct StdIO__T2_a { StdIO_ProcRead array[MaxStack+1]; }; static StdIO__T1 StackW; diff --git a/gcc/m2/pge-boot/GStdIO.h b/gcc/m2/pge-boot/GStdIO.h index 0a45ebc7e34..c54d009b3aa 100644 --- a/gcc/m2/pge-boot/GStdIO.h +++ b/gcc/m2/pge-boot/GStdIO.h @@ -29,8 +29,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_StdIO_H) # define _StdIO_H -#include "config.h" -#include "system.h" # ifdef __cplusplus extern "C" { # endif diff --git a/gcc/m2/pge-boot/GStorage.cc b/gcc/m2/pge-boot/GStorage.cc index 08e878cab51..f22e7f233c6 100644 --- a/gcc/m2/pge-boot/GStorage.cc +++ b/gcc/m2/pge-boot/GStorage.cc @@ -32,9 +32,9 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see typedef struct { PROC_t proc; } PROC; # endif -#define _Storage_H #define _Storage_C +#include "GStorage.h" # include "GSysStorage.h" extern "C" void Storage_ALLOCATE (void * *a, unsigned int Size); diff --git a/gcc/m2/pge-boot/GStorage.h b/gcc/m2/pge-boot/GStorage.h index 8c26b465b2c..e07fee0a44f 100644 --- a/gcc/m2/pge-boot/GStorage.h +++ b/gcc/m2/pge-boot/GStorage.h @@ -29,8 +29,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_Storage_H) # define _Storage_H -#include "config.h" -#include "system.h" # ifdef __cplusplus extern "C" { # endif diff --git a/gcc/m2/pge-boot/GStrCase.cc b/gcc/m2/pge-boot/GStrCase.cc index 8ea7d3c0ce3..d94ebc76770 100644 --- a/gcc/m2/pge-boot/GStrCase.cc +++ b/gcc/m2/pge-boot/GStrCase.cc @@ -34,9 +34,9 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #include #include -#define _StrCase_H #define _StrCase_C +#include "GStrCase.h" # include "GASCII.h" # include "GStrLib.h" @@ -92,12 +92,12 @@ extern "C" void StrCase_StrToUpperCase (const char *a_, unsigned int _a_high, ch i = 0; while (((i < higha) && (a[i] != ASCII_nul)) && (i < highb)) { - b[i] = StrCase_Cap (a[i]); + const_cast(b)[i] = StrCase_Cap (a[i]); i += 1; } if (i < highb) { - b[i] = ASCII_nul; + const_cast(b)[i] = ASCII_nul; } } @@ -122,12 +122,12 @@ extern "C" void StrCase_StrToLowerCase (const char *a_, unsigned int _a_high, ch i = 0; while (((i < higha) && (a[i] != ASCII_nul)) && (i < highb)) { - b[i] = StrCase_Lower (a[i]); + const_cast(b)[i] = StrCase_Lower (a[i]); i += 1; } if (i < highb) { - b[i] = ASCII_nul; + const_cast(b)[i] = ASCII_nul; } } diff --git a/gcc/m2/pge-boot/GStrCase.h b/gcc/m2/pge-boot/GStrCase.h index c3f064728d8..a2b1a716a3a 100644 --- a/gcc/m2/pge-boot/GStrCase.h +++ b/gcc/m2/pge-boot/GStrCase.h @@ -29,8 +29,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_StrCase_H) # define _StrCase_H -#include "config.h" -#include "system.h" # ifdef __cplusplus extern "C" { # endif diff --git a/gcc/m2/pge-boot/GStrIO.cc b/gcc/m2/pge-boot/GStrIO.cc index 1dd3922bb8a..f5c710c83db 100644 --- a/gcc/m2/pge-boot/GStrIO.cc +++ b/gcc/m2/pge-boot/GStrIO.cc @@ -38,9 +38,9 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #include #include -#define _StrIO_H #define _StrIO_C +#include "GStrIO.h" # include "GASCII.h" # include "GStdIO.h" # include "Glibc.h" @@ -204,16 +204,16 @@ extern "C" void StrIO_ReadString (char *a, unsigned int _a_high) /* avoid dangling else. */ if ((ch == ASCII_cr) || (ch == ASCII_lf)) { - a[n] = ASCII_nul; + const_cast(a)[n] = ASCII_nul; n += 1; } else if (ch == ASCII_ff) { /* avoid dangling else. */ - a[0] = ch; + const_cast(a)[0] = ch; if (high > 0) { - a[1] = ASCII_nul; + const_cast(a)[1] = ASCII_nul; } ch = ASCII_cr; } @@ -221,18 +221,18 @@ extern "C" void StrIO_ReadString (char *a, unsigned int _a_high) { /* avoid dangling else. */ Echo (ch); - a[n] = ch; + const_cast(a)[n] = ch; n += 1; } else if (ch == ASCII_eof) { /* avoid dangling else. */ - a[n] = ch; + const_cast(a)[n] = ch; n += 1; ch = ASCII_cr; if (n <= high) { - a[n] = ASCII_nul; + const_cast(a)[n] = ASCII_nul; } } } diff --git a/gcc/m2/pge-boot/GStrIO.h b/gcc/m2/pge-boot/GStrIO.h index 2ed2ac33f11..2d003c5aeeb 100644 --- a/gcc/m2/pge-boot/GStrIO.h +++ b/gcc/m2/pge-boot/GStrIO.h @@ -29,8 +29,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_StrIO_H) # define _StrIO_H -#include "config.h" -#include "system.h" # ifdef __cplusplus extern "C" { # endif diff --git a/gcc/m2/pge-boot/GStrLib.cc b/gcc/m2/pge-boot/GStrLib.cc index 4a92d1c34f8..f8e3c4621a0 100644 --- a/gcc/m2/pge-boot/GStrLib.cc +++ b/gcc/m2/pge-boot/GStrLib.cc @@ -42,9 +42,9 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #include #include -#define _StrLib_H #define _StrLib_C +#include "GStrLib.h" # include "GASCII.h" @@ -127,13 +127,13 @@ extern "C" void StrLib_StrConCat (const char *a_, unsigned int _a_high, const ch j = 0; while ((j < Highb) && (i <= Highc)) { - c[i] = b[j]; + const_cast(c)[i] = b[j]; i += 1; j += 1; } if (i <= Highc) { - c[i] = ASCII_nul; + const_cast(c)[i] = ASCII_nul; } } @@ -247,12 +247,12 @@ extern "C" void StrLib_StrCopy (const char *src_, unsigned int _src_high, char * HighDest = _dest_high; while ((n < HighSrc) && (n <= HighDest)) { - dest[n] = src[n]; + const_cast(dest)[n] = src[n]; n += 1; } if (n <= HighDest) { - dest[n] = ASCII_nul; + const_cast(dest)[n] = ASCII_nul; } } @@ -328,13 +328,13 @@ extern "C" void StrLib_StrRemoveWhitePrefix (const char *a_, unsigned int _a_hig } while ((i < higha) && (j <= highb)) { - b[j] = a[i]; + const_cast(b)[j] = a[i]; i += 1; j += 1; } if (j <= highb) { - b[j] = ASCII_nul; + const_cast(b)[j] = ASCII_nul; } } diff --git a/gcc/m2/pge-boot/GStrLib.h b/gcc/m2/pge-boot/GStrLib.h index b292d8990a1..9e81f002146 100644 --- a/gcc/m2/pge-boot/GStrLib.h +++ b/gcc/m2/pge-boot/GStrLib.h @@ -29,8 +29,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_StrLib_H) # define _StrLib_H -#include "config.h" -#include "system.h" # ifdef __cplusplus extern "C" { # endif diff --git a/gcc/m2/pge-boot/GStringConvert.h b/gcc/m2/pge-boot/GStringConvert.h index 284eef236cc..209ec45a2be 100644 --- a/gcc/m2/pge-boot/GStringConvert.h +++ b/gcc/m2/pge-boot/GStringConvert.h @@ -29,8 +29,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_StringConvert_H) # define _StringConvert_H -#include "config.h" -#include "system.h" # ifdef __cplusplus extern "C" { # endif diff --git a/gcc/m2/pge-boot/GSymbolKey.cc b/gcc/m2/pge-boot/GSymbolKey.cc index ec27e2c67b6..e58153240bd 100644 --- a/gcc/m2/pge-boot/GSymbolKey.cc +++ b/gcc/m2/pge-boot/GSymbolKey.cc @@ -20,8 +20,6 @@ You should have received a copy of the GNU General Public License along with GNU Modula-2; see the file COPYING3. If not see . */ -#include "config.h" -#include "system.h" #include # if !defined (PROC_D) # define PROC_D @@ -33,6 +31,7 @@ along with GNU Modula-2; see the file COPYING3. If not see # define FALSE (1==0) # endif +#include # include "GStorage.h" #if defined(__cplusplus) # undef NULL diff --git a/gcc/m2/pge-boot/GSymbolKey.h b/gcc/m2/pge-boot/GSymbolKey.h index 48be595fb02..2fb363f0081 100644 --- a/gcc/m2/pge-boot/GSymbolKey.h +++ b/gcc/m2/pge-boot/GSymbolKey.h @@ -24,8 +24,6 @@ along with GNU Modula-2; see the file COPYING3. If not see #if !defined (_SymbolKey_H) # define _SymbolKey_H -#include "config.h" -#include "system.h" # ifdef __cplusplus extern "C" { # endif diff --git a/gcc/m2/pge-boot/GSysExceptions.h b/gcc/m2/pge-boot/GSysExceptions.h index 00dd52117d1..2cfc026b7d8 100644 --- a/gcc/m2/pge-boot/GSysExceptions.h +++ b/gcc/m2/pge-boot/GSysExceptions.h @@ -29,8 +29,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_SysExceptions_H) # define _SysExceptions_H -#include "config.h" -#include "system.h" # ifdef __cplusplus extern "C" { # endif diff --git a/gcc/m2/pge-boot/GSysStorage.cc b/gcc/m2/pge-boot/GSysStorage.cc index 9449a3e2b96..19e11ac2439 100644 --- a/gcc/m2/pge-boot/GSysStorage.cc +++ b/gcc/m2/pge-boot/GSysStorage.cc @@ -46,9 +46,9 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see # undef NULL # define NULL 0 #endif -#define _SysStorage_H #define _SysStorage_C +#include "GSysStorage.h" # include "Glibc.h" # include "GDebug.h" # include "GSYSTEM.h" @@ -229,7 +229,7 @@ extern "C" void _M2_SysStorage_init (__attribute__((unused)) int argc,__attribut callno = 0; if (enableTrace) { - trace = (libc_getenv (const_cast (reinterpret_cast("M2DEBUG_SYSSTORAGE_trace")))) != NULL; + trace = (libc_getenv (const_cast (static_cast("M2DEBUG_SYSSTORAGE_trace")))) != NULL; } else { @@ -237,7 +237,7 @@ extern "C" void _M2_SysStorage_init (__attribute__((unused)) int argc,__attribut } if (enableZero) { - zero = (libc_getenv (const_cast (reinterpret_cast("M2DEBUG_SYSSTORAGE_zero")))) != NULL; + zero = (libc_getenv (const_cast (static_cast("M2DEBUG_SYSSTORAGE_zero")))) != NULL; } else { diff --git a/gcc/m2/pge-boot/GSysStorage.h b/gcc/m2/pge-boot/GSysStorage.h index 639f6811e19..89d349280b3 100644 --- a/gcc/m2/pge-boot/GSysStorage.h +++ b/gcc/m2/pge-boot/GSysStorage.h @@ -29,8 +29,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_SysStorage_H) # define _SysStorage_H -#include "config.h" -#include "system.h" # ifdef __cplusplus extern "C" { # endif diff --git a/gcc/m2/pge-boot/GTimeString.h b/gcc/m2/pge-boot/GTimeString.h index 7ba51f8081e..e544d627ff6 100644 --- a/gcc/m2/pge-boot/GTimeString.h +++ b/gcc/m2/pge-boot/GTimeString.h @@ -29,8 +29,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_TimeString_H) # define _TimeString_H -#include "config.h" -#include "system.h" # ifdef __cplusplus extern "C" { # endif diff --git a/gcc/m2/pge-boot/GUnixArgs.h b/gcc/m2/pge-boot/GUnixArgs.h index cf9756ea177..0907b94ce35 100644 --- a/gcc/m2/pge-boot/GUnixArgs.h +++ b/gcc/m2/pge-boot/GUnixArgs.h @@ -29,8 +29,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_UnixArgs_H) # define _UnixArgs_H -#include "config.h" -#include "system.h" # ifdef __cplusplus extern "C" { # endif diff --git a/gcc/m2/pge-boot/Gbnflex.cc b/gcc/m2/pge-boot/Gbnflex.cc index 36615080d3f..636e4e36c65 100644 --- a/gcc/m2/pge-boot/Gbnflex.cc +++ b/gcc/m2/pge-boot/Gbnflex.cc @@ -37,9 +37,9 @@ along with GNU Modula-2; see the file COPYING3. If not see #include #include -#define _bnflex_H #define _bnflex_C +#include "Gbnflex.h" # include "GPushBackInput.h" # include "GSymbolKey.h" # include "GASCII.h" @@ -51,8 +51,6 @@ along with GNU Modula-2; see the file COPYING3. If not see # include "GStdIO.h" # define MaxNameLength 8192 -typedef enum {bnflex_identtok, bnflex_literaltok, bnflex_codetok, bnflex_lbecomestok, bnflex_rbecomestok, bnflex_bartok, bnflex_lsparatok, bnflex_rsparatok, bnflex_lcparatok, bnflex_rcparatok, bnflex_lparatok, bnflex_rparatok, bnflex_errortok, bnflex_tfunctok, bnflex_symfunctok, bnflex_squotetok, bnflex_dquotetok, bnflex_moduletok, bnflex_begintok, bnflex_rulestok, bnflex_endtok, bnflex_lesstok, bnflex_gretok, bnflex_tokentok, bnflex_specialtok, bnflex_firsttok, bnflex_followtok, bnflex_BNFtok, bnflex_FNBtok, bnflex_declarationtok, bnflex_epsilontok, bnflex_eoftok} bnflex_TokenType; - static FIO_File f; static SymbolKey_SymbolTree ReservedWords; static NameKey_Name CurrentToken; diff --git a/gcc/m2/pge-boot/Gbnflex.h b/gcc/m2/pge-boot/Gbnflex.h index a3da44e56d8..451a73dcb2e 100644 --- a/gcc/m2/pge-boot/Gbnflex.h +++ b/gcc/m2/pge-boot/Gbnflex.h @@ -24,8 +24,6 @@ along with GNU Modula-2; see the file COPYING3. If not see #if !defined (_bnflex_H) # define _bnflex_H -#include "config.h" -#include "system.h" # ifdef __cplusplus extern "C" { # endif diff --git a/gcc/m2/pge-boot/Gdtoa.h b/gcc/m2/pge-boot/Gdtoa.h index 946e339d69a..64ab087afdf 100644 --- a/gcc/m2/pge-boot/Gdtoa.h +++ b/gcc/m2/pge-boot/Gdtoa.h @@ -29,8 +29,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_dtoa_H) # define _dtoa_H -#include "config.h" -#include "system.h" # ifdef __cplusplus extern "C" { # endif @@ -68,7 +66,7 @@ EXTERN double dtoa_strtod (void * s, bool *error); sign does the string have a sign? */ -EXTERN void * dtoa_dtoa (double d, dtoa_Mode mode, int ndigits, int *decpt, bool *sign); +EXTERN void * dtoa_dtoa (double d, int mode, int ndigits, int *decpt, bool *sign); # ifdef __cplusplus } # endif diff --git a/gcc/m2/pge-boot/Gerrno.h b/gcc/m2/pge-boot/Gerrno.h index 7f065ccb24d..5ab2ab143f7 100644 --- a/gcc/m2/pge-boot/Gerrno.h +++ b/gcc/m2/pge-boot/Gerrno.h @@ -29,8 +29,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_errno_H) # define _errno_H -#include "config.h" -#include "system.h" # ifdef __cplusplus extern "C" { # endif diff --git a/gcc/m2/pge-boot/Gldtoa.h b/gcc/m2/pge-boot/Gldtoa.h index 0678e9e2d81..26152b7e12b 100644 --- a/gcc/m2/pge-boot/Gldtoa.h +++ b/gcc/m2/pge-boot/Gldtoa.h @@ -29,8 +29,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_ldtoa_H) # define _ldtoa_H -#include "config.h" -#include "system.h" # ifdef __cplusplus extern "C" { # endif @@ -68,7 +66,7 @@ EXTERN long double ldtoa_strtold (void *s, bool *error); sign does the string have a sign? */ -EXTERN void * ldtoa_ldtoa (long double d, ldtoa_Mode mode, int ndigits, int *decpt, bool *sign); +EXTERN void * ldtoa_ldtoa (long double d, int mode, int ndigits, int *decpt, bool *sign); # ifdef __cplusplus } # endif diff --git a/gcc/m2/pge-boot/Glibc.h b/gcc/m2/pge-boot/Glibc.h index 0a5481ef523..95027e6c7ec 100644 --- a/gcc/m2/pge-boot/Glibc.h +++ b/gcc/m2/pge-boot/Glibc.h @@ -29,8 +29,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_libc_H) # define _libc_H -#include "config.h" -#include "system.h" # ifdef __cplusplus extern "C" { # endif @@ -41,6 +39,8 @@ extern "C" { typedef struct { PROC_t proc; } PROC; # endif +#include +# include # include "GSYSTEM.h" # if defined (_libc_C) @@ -85,6 +85,17 @@ typedef libc_exitP_t libc_exitP_C; struct libc_exitP_p { libc_exitP_t proc; }; +EXTERN double libc_atof (void * nptr); +EXTERN int libc_atoi (void * nptr); +EXTERN ssize_t libc_atol (void * nptr); +EXTERN long int libc_atoll (void * nptr); +EXTERN double libc_strtod (void * nptr, void * endptr); +EXTERN float libc_strtof (void * nptr, void * endptr); +EXTERN long double libc_strtold (void * nptr, void * endptr); +EXTERN ssize_t libc_strtol (void * nptr, void * endptr, int base); +EXTERN long int libc_strtoll (void * nptr, void * endptr, int base); +EXTERN size_t libc_strtoul (void * nptr, void * endptr, int base); +EXTERN long unsigned int libc_strtoull (void * nptr, void * endptr, int base); EXTERN ssize_t libc_write (int d, void * buf, size_t nbytes); EXTERN ssize_t libc_read (int d, void * buf, size_t nbytes); EXTERN int libc_system (void * a); @@ -198,7 +209,7 @@ EXTERN ssize_t libc_lseek (int fd, ssize_t offset, int whence); perror - writes errno and string. (ARRAY OF CHAR is translated onto ADDRESS). */ -EXTERN void libc_perror (const char *str); +EXTERN void libc_perror (const char *string_, unsigned int _string_high); /* readv - reads an io vector of bytes. diff --git a/gcc/m2/pge-boot/Glibm.h b/gcc/m2/pge-boot/Glibm.h index d3c9415070c..899d7dd6879 100644 --- a/gcc/m2/pge-boot/Glibm.h +++ b/gcc/m2/pge-boot/Glibm.h @@ -29,8 +29,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_libm_H) # define _libm_H -#include "config.h" -#include "system.h" # ifdef __cplusplus extern "C" { # endif diff --git a/gcc/m2/pge-boot/Gpge.cc b/gcc/m2/pge-boot/Gpge.cc index e231abeea47..383a8f86dae 100644 --- a/gcc/m2/pge-boot/Gpge.cc +++ b/gcc/m2/pge-boot/Gpge.cc @@ -3621,7 +3621,7 @@ static void Format1 (const char *src_, unsigned int _src_high, unsigned int n, c j = 0; while ((((i < HighSrc) && (src[i] != ASCII_nul)) && (j < HighDest)) && (src[i] != '%')) { - dest[j] = src[i]; + const_cast(dest)[j] = src[i]; i += 1; j += 1; } @@ -3630,7 +3630,7 @@ static void Format1 (const char *src_, unsigned int _src_high, unsigned int n, c /* avoid gcc warning by using compound statement even if not strictly necessary. */ if (src[i+1] == 's') { - dest[j] = ASCII_nul; + const_cast(dest)[j] = ASCII_nul; NameKey_GetKey (n, (char *) &str.array[0], MaxString); StrLib_StrConCat ((const char *) dest, _dest_high, (const char *) &str.array[0], MaxString, (char *) dest, _dest_high); j = StrLib_StrLen ((const char *) dest, _dest_high); @@ -3639,7 +3639,7 @@ static void Format1 (const char *src_, unsigned int _src_high, unsigned int n, c else if (src[i+1] == 'd') { /* avoid dangling else. */ - dest[j] = ASCII_nul; + const_cast(dest)[j] = ASCII_nul; NumberIO_CardToStr (n, 0, (char *) &str.array[0], MaxString); StrLib_StrConCat ((const char *) dest, _dest_high, (const char *) &str.array[0], MaxString, (char *) dest, _dest_high); j = StrLib_StrLen ((const char *) dest, _dest_high); @@ -3648,7 +3648,7 @@ static void Format1 (const char *src_, unsigned int _src_high, unsigned int n, c else { /* avoid dangling else. */ - dest[j] = src[i]; + const_cast(dest)[j] = src[i]; i += 1; j += 1; } @@ -3656,13 +3656,13 @@ static void Format1 (const char *src_, unsigned int _src_high, unsigned int n, c /* and finish off copying src into dest */ while (((i < HighSrc) && (src[i] != ASCII_nul)) && (j < HighDest)) { - dest[j] = src[i]; + const_cast(dest)[j] = src[i]; i += 1; j += 1; } if (j < HighDest) { - dest[j] = ASCII_nul; + const_cast(dest)[j] = ASCII_nul; } } @@ -7490,9 +7490,9 @@ static bool FindStr (pge_CodeHunk *code, unsigned int *i, const char *str_, unsi /* make a local copy of each unbounded array. */ memcpy (str, str_, _str_high+1); - j = StrLib_StrLen ((const char *) str, _str_high); t = (*code); k = (StrLib_StrLen ((const char *) &(*code)->codetext.array[0], MaxCodeHunkLength))+1; + j = StrLib_StrLen ((const char *) str, _str_high); while (t != NULL) { do { @@ -7804,7 +7804,7 @@ static void OrSet (pge_SetDesc *to, pge_SetDesc from) default: - Debug_Halt ((const char *) "unknown element in enumeration type", 35, (const char *) "m2/gm2-auto/pge.mod", 19, (const char *) "OrSet", 5, 4133); + Debug_Halt ((const char *) "unknown element in enumeration type", 35, (const char *) "m2/gm2-auto/pge.mod", 19, (const char *) "OrSet", 5, 4134); break; } from = from->next; diff --git a/gcc/m2/pge-boot/Gtermios.h b/gcc/m2/pge-boot/Gtermios.h index acb7fcf0c76..fe510d518b9 100644 --- a/gcc/m2/pge-boot/Gtermios.h +++ b/gcc/m2/pge-boot/Gtermios.h @@ -29,8 +29,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_termios_H) # define _termios_H -#include "config.h" -#include "system.h" # ifdef __cplusplus extern "C" { # endif diff --git a/gcc/m2/pge-boot/Gwrapc.h b/gcc/m2/pge-boot/Gwrapc.h index e4db1e2a99f..b28f3caf9cd 100644 --- a/gcc/m2/pge-boot/Gwrapc.h +++ b/gcc/m2/pge-boot/Gwrapc.h @@ -29,8 +29,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_wrapc_H) # define _wrapc_H -#include "config.h" -#include "system.h" # ifdef __cplusplus extern "C" { # endif diff --git a/gcc/multiple_target.cc b/gcc/multiple_target.cc index 1fdd279da04..d2c9671fc1b 100644 --- a/gcc/multiple_target.cc +++ b/gcc/multiple_target.cc @@ -20,6 +20,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/objc/objc-act.cc b/gcc/objc/objc-act.cc index cec64c4bfbd..58d465f6c33 100644 --- a/gcc/objc/objc-act.cc +++ b/gcc/objc/objc-act.cc @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/objc/objc-encoding.cc b/gcc/objc/objc-encoding.cc index 7cb0e5add7b..d0078eb23be 100644 --- a/gcc/objc/objc-encoding.cc +++ b/gcc/objc/objc-encoding.cc @@ -17,6 +17,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/objc/objc-gnu-runtime-abi-01.cc b/gcc/objc/objc-gnu-runtime-abi-01.cc index 2eca5f4446b..1f504f437f5 100644 --- a/gcc/objc/objc-gnu-runtime-abi-01.cc +++ b/gcc/objc/objc-gnu-runtime-abi-01.cc @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/objc/objc-lang.cc b/gcc/objc/objc-lang.cc index b0b3e138ba3..430b6b2cb03 100644 --- a/gcc/objc/objc-lang.cc +++ b/gcc/objc/objc-lang.cc @@ -18,7 +18,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ - +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/objc/objc-next-runtime-abi-01.cc b/gcc/objc/objc-next-runtime-abi-01.cc index 32a8d694b0e..60cd7637bf6 100644 --- a/gcc/objc/objc-next-runtime-abi-01.cc +++ b/gcc/objc/objc-next-runtime-abi-01.cc @@ -23,6 +23,7 @@ along with GCC; see the file COPYING3. If not see of additions made for properties and optional protocol methods as ABI=1 (module version 7). */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/objc/objc-next-runtime-abi-02.cc b/gcc/objc/objc-next-runtime-abi-02.cc index 248ef641281..a9614e65dd3 100644 --- a/gcc/objc/objc-next-runtime-abi-02.cc +++ b/gcc/objc/objc-next-runtime-abi-02.cc @@ -25,6 +25,7 @@ along with GCC; see the file COPYING3. If not see This version is intended to match (logically) the output of Apple's 4.2.1 compiler. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/objc/objc-runtime-shared-support.cc b/gcc/objc/objc-runtime-shared-support.cc index 21a88224a0a..bd40195a413 100644 --- a/gcc/objc/objc-runtime-shared-support.cc +++ b/gcc/objc/objc-runtime-shared-support.cc @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/objcp/objcp-decl.cc b/gcc/objcp/objcp-decl.cc index 1c8912f6aa0..9d100c926c3 100644 --- a/gcc/objcp/objcp-decl.cc +++ b/gcc/objcp/objcp-decl.cc @@ -19,6 +19,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/objcp/objcp-lang.cc b/gcc/objcp/objcp-lang.cc index 83447f8cb58..3b54050f029 100644 --- a/gcc/objcp/objcp-lang.cc +++ b/gcc/objcp/objcp-lang.cc @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/omp-expand.cc b/gcc/omp-expand.cc index 9ff9553c3ea..0c3f9862750 100644 --- a/gcc/omp-expand.cc +++ b/gcc/omp-expand.cc @@ -20,6 +20,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/omp-general.cc b/gcc/omp-general.cc index f4c5f577047..f74b9bf5e96 100644 --- a/gcc/omp-general.cc +++ b/gcc/omp-general.cc @@ -19,6 +19,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/omp-low.cc b/gcc/omp-low.cc index da2051b0279..6f7b740788d 100644 --- a/gcc/omp-low.cc +++ b/gcc/omp-low.cc @@ -22,6 +22,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/omp-oacc-neuter-broadcast.cc b/gcc/omp-oacc-neuter-broadcast.cc index 64a596cf0ec..651284ba35f 100644 --- a/gcc/omp-oacc-neuter-broadcast.cc +++ b/gcc/omp-oacc-neuter-broadcast.cc @@ -18,6 +18,7 @@ along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/omp-offload.cc b/gcc/omp-offload.cc index 934fbd80bdd..5c985368241 100644 --- a/gcc/omp-offload.cc +++ b/gcc/omp-offload.cc @@ -19,6 +19,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/omp-simd-clone.cc b/gcc/omp-simd-clone.cc index 864586207ee..14a37f70948 100644 --- a/gcc/omp-simd-clone.cc +++ b/gcc/omp-simd-clone.cc @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/optc-gen.awk b/gcc/optc-gen.awk index 0eccb1951ef..551cc5cf138 100644 --- a/gcc/optc-gen.awk +++ b/gcc/optc-gen.awk @@ -158,6 +158,7 @@ for (i = 0; i < n_opts; i++) { print "/* This file is auto-generated by optc-gen.awk. */" print "" +print "#define INCLUDE_MEMORY" n_headers = split(header_name, headers, " ") for (i = 1; i <= n_headers; i++) print "#include " quote headers[i] quote diff --git a/gcc/optc-save-gen.awk b/gcc/optc-save-gen.awk index b1289c281e7..6fa10c5171f 100644 --- a/gcc/optc-save-gen.awk +++ b/gcc/optc-save-gen.awk @@ -31,6 +31,7 @@ END { print "/* This file is auto-generated by optc-save-gen.awk. */" print "" +print "#define INCLUDE_MEMORY" n_headers = split(header_name, headers, " ") for (i = 1; i <= n_headers; i++) print "#include " quote headers[i] quote diff --git a/gcc/options-urls-cc-gen.awk b/gcc/options-urls-cc-gen.awk index a2933233abe..33715a6c1d2 100644 --- a/gcc/options-urls-cc-gen.awk +++ b/gcc/options-urls-cc-gen.awk @@ -29,6 +29,7 @@ END { print "/* This file is auto-generated by options-urls-cc-gen.awk. */" print "" +print "#define INCLUDE_MEMORY" n_headers = split(header_name, headers, " ") for (i = 1; i <= n_headers; i++) print "#include " quote headers[i] quote diff --git a/gcc/opts-common.cc b/gcc/opts-common.cc index 70ac225e396..ac0e2bdc61d 100644 --- a/gcc/opts-common.cc +++ b/gcc/opts-common.cc @@ -17,6 +17,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #define INCLUDE_STRING #include "config.h" #include "system.h" diff --git a/gcc/opts-global.cc b/gcc/opts-global.cc index a9bc0d53b58..893d29936b5 100644 --- a/gcc/opts-global.cc +++ b/gcc/opts-global.cc @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/opts.cc b/gcc/opts.cc index acd53befdbf..1c5092e22fe 100644 --- a/gcc/opts.cc +++ b/gcc/opts.cc @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "intl.h" diff --git a/gcc/pair-fusion.cc b/gcc/pair-fusion.cc index ccbb5511e9d..ff84c169b91 100644 --- a/gcc/pair-fusion.cc +++ b/gcc/pair-fusion.cc @@ -20,6 +20,7 @@ #define INCLUDE_ALGORITHM #define INCLUDE_FUNCTIONAL #define INCLUDE_LIST +#define INCLUDE_MEMORY #define INCLUDE_TYPE_TRAITS #define INCLUDE_ARRAY #include "config.h" diff --git a/gcc/passes.cc b/gcc/passes.cc index ae80f40b96a..d1e6fe3b91a 100644 --- a/gcc/passes.cc +++ b/gcc/passes.cc @@ -22,6 +22,7 @@ along with GCC; see the file COPYING3. If not see in the proper order, and counts the time used by each. Error messages and low-level interface to malloc also handled here. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/pointer-query.cc b/gcc/pointer-query.cc index a85c04128ff..fea69c8e591 100644 --- a/gcc/pointer-query.cc +++ b/gcc/pointer-query.cc @@ -18,6 +18,7 @@ along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/predict.cc b/gcc/predict.cc index 87b34597662..f30e67dce7f 100644 --- a/gcc/predict.cc +++ b/gcc/predict.cc @@ -26,7 +26,7 @@ along with GCC; see the file COPYING3. If not see [3] "Corpus-based Static Branch Prediction" Calder, Grunwald, Lindsay, Martin, Mozer, and Zorn; PLDI '95. */ - +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/pretty-print.cc b/gcc/pretty-print.cc index 8082dbcdddd..f18214d33bc 100644 --- a/gcc/pretty-print.cc +++ b/gcc/pretty-print.cc @@ -2519,10 +2519,10 @@ pretty_printer::~pretty_printer () /* Base class implementation of pretty_printer::clone vfunc. */ -pretty_printer * +std::unique_ptr pretty_printer::clone () const { - return new pretty_printer (*this); + return ::make_unique (*this); } /* Append a string delimited by START and END to the output area of diff --git a/gcc/pretty-print.h b/gcc/pretty-print.h index 05dbb1986da..561ebfb27a7 100644 --- a/gcc/pretty-print.h +++ b/gcc/pretty-print.h @@ -21,6 +21,14 @@ along with GCC; see the file COPYING3. If not see #ifndef GCC_PRETTY_PRINT_H #define GCC_PRETTY_PRINT_H +/* This header uses std::unique_ptr, but can't be directly + included due to issues with macros. Hence it must be included from + system.h by defining INCLUDE_MEMORY in any source file using it. */ + +#ifndef INCLUDE_MEMORY +# error "You must define INCLUDE_MEMORY before including system.h to use pretty-print.h" +#endif + #include "obstack.h" #include "rich-location.h" #include "diagnostic-url.h" @@ -269,7 +277,7 @@ public: virtual ~pretty_printer (); - virtual pretty_printer *clone () const; + virtual std::unique_ptr clone () const; void set_output_stream (FILE *outfile) { diff --git a/gcc/print-rtl.cc b/gcc/print-rtl.cc index 69c2e196e04..1688d4ec5c8 100644 --- a/gcc/print-rtl.cc +++ b/gcc/print-rtl.cc @@ -25,6 +25,7 @@ along with GCC; see the file COPYING3. If not see #include "config.h" #endif +#define INCLUDE_MEMORY #include "system.h" #include "coretypes.h" #include "tm.h" diff --git a/gcc/print-tree.cc b/gcc/print-tree.cc index 0dda09a99e3..d313a2adfaf 100644 --- a/gcc/print-tree.cc +++ b/gcc/print-tree.cc @@ -18,6 +18,7 @@ along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/profile-count.cc b/gcc/profile-count.cc index b26f38e33e4..0f30fa26153 100644 --- a/gcc/profile-count.cc +++ b/gcc/profile-count.cc @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/range-op-float.cc b/gcc/range-op-float.cc index 2754dd87568..a42bca0280f 100644 --- a/gcc/range-op-float.cc +++ b/gcc/range-op-float.cc @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/range-op-ptr.cc b/gcc/range-op-ptr.cc index ef2b2cce516..9f500c52d2c 100644 --- a/gcc/range-op-ptr.cc +++ b/gcc/range-op-ptr.cc @@ -19,6 +19,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/range-op.cc b/gcc/range-op.cc index 3f5cf083440..937bee29b1e 100644 --- a/gcc/range-op.cc +++ b/gcc/range-op.cc @@ -19,6 +19,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/range.cc b/gcc/range.cc index 5ee0edc54f6..3b56556c87e 100644 --- a/gcc/range.cc +++ b/gcc/range.cc @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/read-rtl-function.cc b/gcc/read-rtl-function.cc index fa1aeb53759..51dc11928d0 100644 --- a/gcc/read-rtl-function.cc +++ b/gcc/read-rtl-function.cc @@ -17,6 +17,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/rtl-error.cc b/gcc/rtl-error.cc index 6d05f0b9626..0a92a1ad2c0 100644 --- a/gcc/rtl-error.cc +++ b/gcc/rtl-error.cc @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/rtl-ssa/accesses.cc b/gcc/rtl-ssa/accesses.cc index ef99759871a..9fa7fee621c 100644 --- a/gcc/rtl-ssa/accesses.cc +++ b/gcc/rtl-ssa/accesses.cc @@ -19,6 +19,7 @@ #define INCLUDE_ALGORITHM #define INCLUDE_FUNCTIONAL +#define INCLUDE_MEMORY #define INCLUDE_ARRAY #include "config.h" #include "system.h" diff --git a/gcc/rtl-ssa/blocks.cc b/gcc/rtl-ssa/blocks.cc index dfc4e7d0610..780a241cab6 100644 --- a/gcc/rtl-ssa/blocks.cc +++ b/gcc/rtl-ssa/blocks.cc @@ -19,6 +19,7 @@ #define INCLUDE_ALGORITHM #define INCLUDE_FUNCTIONAL +#define INCLUDE_MEMORY #define INCLUDE_ARRAY #include "config.h" #include "system.h" diff --git a/gcc/rtl-ssa/changes.cc b/gcc/rtl-ssa/changes.cc index 0476296607b..f2be1195bc0 100644 --- a/gcc/rtl-ssa/changes.cc +++ b/gcc/rtl-ssa/changes.cc @@ -19,6 +19,7 @@ #define INCLUDE_ALGORITHM #define INCLUDE_FUNCTIONAL +#define INCLUDE_MEMORY #define INCLUDE_ARRAY #include "config.h" #include "system.h" diff --git a/gcc/rtl-ssa/functions.cc b/gcc/rtl-ssa/functions.cc index bffccc57aab..b14fb076da0 100644 --- a/gcc/rtl-ssa/functions.cc +++ b/gcc/rtl-ssa/functions.cc @@ -19,6 +19,7 @@ #define INCLUDE_ALGORITHM #define INCLUDE_FUNCTIONAL +#define INCLUDE_MEMORY #define INCLUDE_ARRAY #include "config.h" #include "system.h" diff --git a/gcc/rtl-ssa/insns.cc b/gcc/rtl-ssa/insns.cc index d0c3e56b8be..bfc6683cc45 100644 --- a/gcc/rtl-ssa/insns.cc +++ b/gcc/rtl-ssa/insns.cc @@ -19,6 +19,7 @@ #define INCLUDE_ALGORITHM #define INCLUDE_FUNCTIONAL +#define INCLUDE_MEMORY #define INCLUDE_ARRAY #include "config.h" #include "system.h" diff --git a/gcc/rtl-ssa/movement.cc b/gcc/rtl-ssa/movement.cc index 38432119f33..c34c70da194 100644 --- a/gcc/rtl-ssa/movement.cc +++ b/gcc/rtl-ssa/movement.cc @@ -19,6 +19,7 @@ #define INCLUDE_ALGORITHM #define INCLUDE_FUNCTIONAL +#define INCLUDE_MEMORY #define INCLUDE_ARRAY #include "config.h" #include "system.h" diff --git a/gcc/rtl-tests.cc b/gcc/rtl-tests.cc index 4569770a238..ef717cc22f3 100644 --- a/gcc/rtl-tests.cc +++ b/gcc/rtl-tests.cc @@ -17,6 +17,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/rust/resolve/rust-ast-resolve-expr.cc b/gcc/rust/resolve/rust-ast-resolve-expr.cc index 5520dc23501..74f11dd215c 100644 --- a/gcc/rust/resolve/rust-ast-resolve-expr.cc +++ b/gcc/rust/resolve/rust-ast-resolve-expr.cc @@ -16,6 +16,7 @@ // along with GCC; see the file COPYING3. If not see // . +#define INCLUDE_MEMORY #include "rust-ast-resolve-expr.h" #include "rust-ast-resolve-stmt.h" #include "rust-ast-resolve-struct-expr-field.h" diff --git a/gcc/rust/rust-attribs.cc b/gcc/rust/rust-attribs.cc index 86d5b3dfeb9..ddcef72f07e 100644 --- a/gcc/rust/rust-attribs.cc +++ b/gcc/rust/rust-attribs.cc @@ -15,6 +15,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/rust/rust-system.h b/gcc/rust/rust-system.h index 2382e5b1fb4..1833b93542d 100644 --- a/gcc/rust/rust-system.h +++ b/gcc/rust/rust-system.h @@ -21,6 +21,7 @@ #define RUST_SYSTEM_H #define INCLUDE_ALGORITHM +#define INCLUDE_MEMORY #include "config.h" /* Define this so that inttypes.h defines the PRI?64 macros even diff --git a/gcc/sanopt.cc b/gcc/sanopt.cc index 604db6b3912..0d79a0271f7 100644 --- a/gcc/sanopt.cc +++ b/gcc/sanopt.cc @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/sched-rgn.cc b/gcc/sched-rgn.cc index 3d8cff76aaf..4f511b3ca50 100644 --- a/gcc/sched-rgn.cc +++ b/gcc/sched-rgn.cc @@ -43,6 +43,7 @@ along with GCC; see the file COPYING3. If not see priorities are computed, and (3) block level: insns in the block are actually scheduled. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/selftest-diagnostic-path.cc b/gcc/selftest-diagnostic-path.cc index 6d21f2e5599..1b0ba2c1a3f 100644 --- a/gcc/selftest-diagnostic-path.cc +++ b/gcc/selftest-diagnostic-path.cc @@ -20,6 +20,7 @@ along with GCC; see the file COPYING3. If not see #include "config.h" +#define INCLUDE_MEMORY #define INCLUDE_VECTOR #include "system.h" #include "coretypes.h" diff --git a/gcc/selftest-diagnostic.cc b/gcc/selftest-diagnostic.cc index 4e9ee921b04..a066fe20066 100644 --- a/gcc/selftest-diagnostic.cc +++ b/gcc/selftest-diagnostic.cc @@ -17,6 +17,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/splay-tree-utils.cc b/gcc/splay-tree-utils.cc index 6437a5a98fa..eb99b6b0e4b 100644 --- a/gcc/splay-tree-utils.cc +++ b/gcc/splay-tree-utils.cc @@ -19,6 +19,7 @@ #define INCLUDE_ALGORITHM #define INCLUDE_ARRAY +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/sreal.cc b/gcc/sreal.cc index be557e7de80..b9f049748ef 100644 --- a/gcc/sreal.cc +++ b/gcc/sreal.cc @@ -47,6 +47,7 @@ along with GCC; see the file COPYING3. If not see sig == 0 && exp == -SREAL_MAX_EXP */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include diff --git a/gcc/stmt.cc b/gcc/stmt.cc index ae1527f0a19..d272a45c82b 100644 --- a/gcc/stmt.cc +++ b/gcc/stmt.cc @@ -22,6 +22,7 @@ along with GCC; see the file COPYING3. If not see The functions whose names start with `expand_' are called by the expander to generate RTL instructions for various kinds of constructs. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/substring-locations.cc b/gcc/substring-locations.cc index 156c12134ba..96224d3c8d0 100644 --- a/gcc/substring-locations.cc +++ b/gcc/substring-locations.cc @@ -17,6 +17,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/symtab-clones.cc b/gcc/symtab-clones.cc index d50a95ebec6..79c93125af5 100644 --- a/gcc/symtab-clones.cc +++ b/gcc/symtab-clones.cc @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/symtab-thunks.cc b/gcc/symtab-thunks.cc index c7ca06ff479..f754a8a96e2 100644 --- a/gcc/symtab-thunks.cc +++ b/gcc/symtab-thunks.cc @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/symtab.cc b/gcc/symtab.cc index 3b018ab3ea2..5e19062987e 100644 --- a/gcc/symtab.cc +++ b/gcc/symtab.cc @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/testsuite/gcc.dg/plugin/diagnostic_group_plugin.c b/gcc/testsuite/gcc.dg/plugin/diagnostic_group_plugin.c index 2f780338b6e..7e6d7e1de25 100644 --- a/gcc/testsuite/gcc.dg/plugin/diagnostic_group_plugin.c +++ b/gcc/testsuite/gcc.dg/plugin/diagnostic_group_plugin.c @@ -29,6 +29,7 @@ #include "diagnostic.h" #include "diagnostic-format-text.h" #include "context.h" +#include "make-unique.h" int plugin_is_GPL_compatible; @@ -229,7 +230,7 @@ plugin_init (struct plugin_name_args *plugin_info, diagnostic_text_starter (global_dc) = test_diagnostic_text_starter; diagnostic_start_span (global_dc) = test_diagnostic_start_span_fn; - global_dc->set_output_format (new test_output_format (*global_dc)); + global_dc->set_output_format (::make_unique (*global_dc)); pass_info.pass = new pass_test_groups (g); pass_info.reference_pass_name = "*warn_function_noreturn"; diff --git a/gcc/testsuite/gcc.dg/plugin/diagnostic_plugin_xhtml_format.c b/gcc/testsuite/gcc.dg/plugin/diagnostic_plugin_xhtml_format.c index eb294761916..2f95e4a0ceb 100644 --- a/gcc/testsuite/gcc.dg/plugin/diagnostic_plugin_xhtml_format.c +++ b/gcc/testsuite/gcc.dg/plugin/diagnostic_plugin_xhtml_format.c @@ -689,9 +689,10 @@ public: diagnostic_output_format::dump (out, indent); } - diagnostic_per_format_buffer *make_per_format_buffer () final override + std::unique_ptr + make_per_format_buffer () final override { - return new diagnostic_xhtml_format_buffer (m_builder); + return ::make_unique (m_builder); } void set_buffer (diagnostic_per_format_buffer *base_buffer) final override { @@ -810,7 +811,7 @@ diagnostic_output_format_init_xhtml (diagnostic_context &context, pp_show_color (fmt->get_printer ()) = false; context.set_show_highlight_colors (false); - context.set_output_format (fmt.release ()); + context.set_output_format (std::move (fmt)); } /* Populate CONTEXT in preparation for XHTML output to stderr. */ @@ -949,9 +950,10 @@ plugin_init (struct plugin_name_args *plugin_info, if (!plugin_default_version_check (version, &gcc_version)) return 1; - global_dc->set_output_format (new xhtml_stream_output_format (*global_dc, - line_table, - stderr)); + global_dc->set_output_format + (::make_unique (*global_dc, + line_table, + stderr)); #if CHECKING_P selftest::xhtml_format_selftests (); diff --git a/gcc/testsuite/gcc.dg/plugin/ggcplug.c b/gcc/testsuite/gcc.dg/plugin/ggcplug.c index a75eed0e398..d8199038b69 100644 --- a/gcc/testsuite/gcc.dg/plugin/ggcplug.c +++ b/gcc/testsuite/gcc.dg/plugin/ggcplug.c @@ -1,6 +1,7 @@ /* This plugin tests the GGC related plugin events. */ /* { dg-options "-O" } */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/text-art/box-drawing.cc b/gcc/text-art/box-drawing.cc index 7057a4eac60..e6092735bbe 100644 --- a/gcc/text-art/box-drawing.cc +++ b/gcc/text-art/box-drawing.cc @@ -19,6 +19,7 @@ along with GCC; see the file COPYING3. If not see . */ #include "config.h" +#define INCLUDE_MEMORY #define INCLUDE_VECTOR #include "system.h" #include "coretypes.h" diff --git a/gcc/text-art/canvas.cc b/gcc/text-art/canvas.cc index 8e5d96808d8..b2315d96d0d 100644 --- a/gcc/text-art/canvas.cc +++ b/gcc/text-art/canvas.cc @@ -19,6 +19,7 @@ along with GCC; see the file COPYING3. If not see . */ #include "config.h" +#define INCLUDE_MEMORY #define INCLUDE_VECTOR #include "system.h" #include "coretypes.h" diff --git a/gcc/text-art/ruler.cc b/gcc/text-art/ruler.cc index f80d9bb8758..2abc36fc7c9 100644 --- a/gcc/text-art/ruler.cc +++ b/gcc/text-art/ruler.cc @@ -20,6 +20,7 @@ along with GCC; see the file COPYING3. If not see #include "config.h" #define INCLUDE_ALGORITHM +#define INCLUDE_MEMORY #define INCLUDE_VECTOR #include "system.h" #include "coretypes.h" diff --git a/gcc/text-art/selftests.cc b/gcc/text-art/selftests.cc index 2b113b6b017..3c72c943929 100644 --- a/gcc/text-art/selftests.cc +++ b/gcc/text-art/selftests.cc @@ -19,6 +19,7 @@ along with GCC; see the file COPYING3. If not see . */ #include "config.h" +#define INCLUDE_MEMORY #define INCLUDE_VECTOR #include "system.h" #include "coretypes.h" diff --git a/gcc/text-art/theme.cc b/gcc/text-art/theme.cc index e51b8ef7a84..580c931aef2 100644 --- a/gcc/text-art/theme.cc +++ b/gcc/text-art/theme.cc @@ -19,6 +19,7 @@ along with GCC; see the file COPYING3. If not see . */ #include "config.h" +#define INCLUDE_MEMORY #define INCLUDE_VECTOR #include "system.h" #include "coretypes.h" diff --git a/gcc/toplev.cc b/gcc/toplev.cc index 62034c32b4a..a12a2e1afba 100644 --- a/gcc/toplev.cc +++ b/gcc/toplev.cc @@ -42,6 +42,7 @@ along with GCC; see the file COPYING3. If not see #include "cgraph.h" #include "coverage.h" #include "diagnostic.h" +#include "pretty-print-urlifier.h" #include "varasm.h" #include "tree-inline.h" #include "realmpfr.h" /* For GMP/MPFR/MPC versions, in print_version. */ @@ -94,6 +95,7 @@ along with GCC; see the file COPYING3. If not see #include "dbgcnt.h" #include "gcc-urlifier.h" #include "unique-argv.h" +#include "make-unique.h" #include "selftest.h" @@ -1094,9 +1096,9 @@ general_init (const char *argv0, bool init_signals, unique_argv original_argv) global_dc->m_internal_error = internal_error_function; const unsigned lang_mask = lang_hooks.option_lang_mask (); global_dc->set_option_manager - (new compiler_diagnostic_option_manager (*global_dc, - lang_mask, - &global_options), + (::make_unique (*global_dc, + lang_mask, + &global_options), lang_mask); global_dc->set_urlifier (make_gcc_urlifier (lang_mask)); diff --git a/gcc/trans-mem.cc b/gcc/trans-mem.cc index fb0c95a8793..3cf0bf34a12 100644 --- a/gcc/trans-mem.cc +++ b/gcc/trans-mem.cc @@ -19,6 +19,7 @@ along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/tree-affine.cc b/gcc/tree-affine.cc index 76117aa4fd6..1373664dff1 100644 --- a/gcc/tree-affine.cc +++ b/gcc/tree-affine.cc @@ -17,6 +17,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/tree-call-cdce.cc b/gcc/tree-call-cdce.cc index befe6acf178..077d6fda6e8 100644 --- a/gcc/tree-call-cdce.cc +++ b/gcc/tree-call-cdce.cc @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/tree-cfg.cc b/gcc/tree-cfg.cc index fcb488d8711..a850146987f 100644 --- a/gcc/tree-cfg.cc +++ b/gcc/tree-cfg.cc @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/tree-chrec.cc b/gcc/tree-chrec.cc index 9b272074a2e..0c9776f2999 100644 --- a/gcc/tree-chrec.cc +++ b/gcc/tree-chrec.cc @@ -23,6 +23,7 @@ along with GCC; see the file COPYING3. If not see variables. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/tree-dfa.cc b/gcc/tree-dfa.cc index 77e119a6b1b..96719463e69 100644 --- a/gcc/tree-dfa.cc +++ b/gcc/tree-dfa.cc @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/tree-diagnostic-client-data-hooks.cc b/gcc/tree-diagnostic-client-data-hooks.cc index a2e4a5c97bd..d966cf50f0d 100644 --- a/gcc/tree-diagnostic-client-data-hooks.cc +++ b/gcc/tree-diagnostic-client-data-hooks.cc @@ -32,6 +32,7 @@ along with GCC; see the file COPYING3. If not see #include "langhooks.h" #include "plugin.h" #include "timevar.h" +#include "make-unique.h" /* Concrete class for supplying a diagnostic_context with information about a specific plugin within the client, when the client is the @@ -166,8 +167,8 @@ private: /* Create a compiler_data_hooks (so that the class can be local to this file). */ -diagnostic_client_data_hooks * +std::unique_ptr make_compiler_data_hooks () { - return new compiler_data_hooks (); + return ::make_unique (); } diff --git a/gcc/tree-diagnostic.cc b/gcc/tree-diagnostic.cc index 39471021d0f..b7d2c51c984 100644 --- a/gcc/tree-diagnostic.cc +++ b/gcc/tree-diagnostic.cc @@ -19,6 +19,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/tree-dump.cc b/gcc/tree-dump.cc index ba3cf1a2fe3..46908780ad6 100644 --- a/gcc/tree-dump.cc +++ b/gcc/tree-dump.cc @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/tree-inline.cc b/gcc/tree-inline.cc index 037fd1e946a..e869b0722a0 100644 --- a/gcc/tree-inline.cc +++ b/gcc/tree-inline.cc @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/tree-into-ssa.cc b/gcc/tree-into-ssa.cc index fc61d47ca77..78d5b922fa6 100644 --- a/gcc/tree-into-ssa.cc +++ b/gcc/tree-into-ssa.cc @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/tree-logical-location.cc b/gcc/tree-logical-location.cc index ca8b34a42d3..5967e13e1ff 100644 --- a/gcc/tree-logical-location.cc +++ b/gcc/tree-logical-location.cc @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/tree-nested.cc b/gcc/tree-nested.cc index fc0495d6443..a54e72c3237 100644 --- a/gcc/tree-nested.cc +++ b/gcc/tree-nested.cc @@ -17,6 +17,7 @@ along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/tree-nrv.cc b/gcc/tree-nrv.cc index 0a8f359790a..aa01b96c953 100644 --- a/gcc/tree-nrv.cc +++ b/gcc/tree-nrv.cc @@ -17,6 +17,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/tree-object-size.cc b/gcc/tree-object-size.cc index 0e4bf84fd11..09aad88498e 100644 --- a/gcc/tree-object-size.cc +++ b/gcc/tree-object-size.cc @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/tree-outof-ssa.cc b/gcc/tree-outof-ssa.cc index 6d9c125f4e0..1d9a4a370fa 100644 --- a/gcc/tree-outof-ssa.cc +++ b/gcc/tree-outof-ssa.cc @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/tree-pretty-print.cc b/gcc/tree-pretty-print.cc index cf36b371691..e8dc82c4bb5 100644 --- a/gcc/tree-pretty-print.cc +++ b/gcc/tree-pretty-print.cc @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/tree-profile.cc b/gcc/tree-profile.cc index 153c9323040..91a14927cdc 100644 --- a/gcc/tree-profile.cc +++ b/gcc/tree-profile.cc @@ -24,6 +24,7 @@ along with GCC; see the file COPYING3. If not see /* Generate basic block profile instrumentation and auxiliary files. Tree-based version. See profile.cc for overview. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/tree-scalar-evolution.cc b/gcc/tree-scalar-evolution.cc index abb2bad7773..357e21013e1 100644 --- a/gcc/tree-scalar-evolution.cc +++ b/gcc/tree-scalar-evolution.cc @@ -253,6 +253,7 @@ along with GCC; see the file COPYING3. If not see at: http://cri.ensmp.fr/~pop/gcc/20040604/gccsummit-lno-spop.pdf */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/tree-sra.cc b/gcc/tree-sra.cc index c0915dce5c4..1ad4c4535d0 100644 --- a/gcc/tree-sra.cc +++ b/gcc/tree-sra.cc @@ -71,6 +71,7 @@ along with GCC; see the file COPYING3. If not see Finally, if a parameter got scalarized, the scalar replacements are initialized with values from respective parameter aggregates. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/tree-ssa-address.cc b/gcc/tree-ssa-address.cc index c4dfa371bb8..61f54ec0776 100644 --- a/gcc/tree-ssa-address.cc +++ b/gcc/tree-ssa-address.cc @@ -20,6 +20,7 @@ along with GCC; see the file COPYING3. If not see /* Utility functions for manipulation with TARGET_MEM_REFs -- tree expressions that directly map to addressing modes of the target. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/tree-ssa-alias.cc b/gcc/tree-ssa-alias.cc index fab048b0b59..2cdb5c92b7a 100644 --- a/gcc/tree-ssa-alias.cc +++ b/gcc/tree-ssa-alias.cc @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/tree-ssa-ccp.cc b/gcc/tree-ssa-ccp.cc index db128722823..5852fdc362b 100644 --- a/gcc/tree-ssa-ccp.cc +++ b/gcc/tree-ssa-ccp.cc @@ -118,6 +118,7 @@ along with GCC; see the file COPYING3. If not see Advanced Compiler Design and Implementation, Steven Muchnick, Morgan Kaufmann, 1997, Section 12.6 */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/tree-ssa-coalesce.cc b/gcc/tree-ssa-coalesce.cc index 8d8727de32f..8c9aafb98d7 100644 --- a/gcc/tree-ssa-coalesce.cc +++ b/gcc/tree-ssa-coalesce.cc @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/tree-ssa-copy.cc b/gcc/tree-ssa-copy.cc index 9c9ec47adca..6cbf59412e7 100644 --- a/gcc/tree-ssa-copy.cc +++ b/gcc/tree-ssa-copy.cc @@ -17,6 +17,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/tree-ssa-dce.cc b/gcc/tree-ssa-dce.cc index 015c17984e1..c44eff35b84 100644 --- a/gcc/tree-ssa-dce.cc +++ b/gcc/tree-ssa-dce.cc @@ -42,6 +42,7 @@ along with GCC; see the file COPYING3. If not see giving values to operands in necessary statements; and 3. Removing dead statements. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/tree-ssa-dom.cc b/gcc/tree-ssa-dom.cc index 221fe6db321..ef4e6c1c64a 100644 --- a/gcc/tree-ssa-dom.cc +++ b/gcc/tree-ssa-dom.cc @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/tree-ssa-forwprop.cc b/gcc/tree-ssa-forwprop.cc index 766eaf0e4e7..7af4dc1f8df 100644 --- a/gcc/tree-ssa-forwprop.cc +++ b/gcc/tree-ssa-forwprop.cc @@ -17,6 +17,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/tree-ssa-ifcombine.cc b/gcc/tree-ssa-ifcombine.cc index 6a3bc99190d..f8064094c42 100644 --- a/gcc/tree-ssa-ifcombine.cc +++ b/gcc/tree-ssa-ifcombine.cc @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/tree-ssa-loop-ch.cc b/gcc/tree-ssa-loop-ch.cc index 6552ddd1ee2..ec936d86292 100644 --- a/gcc/tree-ssa-loop-ch.cc +++ b/gcc/tree-ssa-loop-ch.cc @@ -17,6 +17,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/tree-ssa-loop-im.cc b/gcc/tree-ssa-loop-im.cc index ccc56dc42f6..26b4147d07b 100644 --- a/gcc/tree-ssa-loop-im.cc +++ b/gcc/tree-ssa-loop-im.cc @@ -17,6 +17,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/tree-ssa-loop-manip.cc b/gcc/tree-ssa-loop-manip.cc index 213f069c440..326119383fd 100644 --- a/gcc/tree-ssa-loop-manip.cc +++ b/gcc/tree-ssa-loop-manip.cc @@ -17,6 +17,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/tree-ssa-loop-niter.cc b/gcc/tree-ssa-loop-niter.cc index 4583c2beda8..799ace2c9c0 100644 --- a/gcc/tree-ssa-loop-niter.cc +++ b/gcc/tree-ssa-loop-niter.cc @@ -17,6 +17,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/tree-ssa-loop-split.cc b/gcc/tree-ssa-loop-split.cc index 68435485b79..8427b010b3c 100644 --- a/gcc/tree-ssa-loop-split.cc +++ b/gcc/tree-ssa-loop-split.cc @@ -17,6 +17,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/tree-ssa-math-opts.cc b/gcc/tree-ssa-math-opts.cc index f9ccdf41d67..e78ef76bd3b 100644 --- a/gcc/tree-ssa-math-opts.cc +++ b/gcc/tree-ssa-math-opts.cc @@ -84,6 +84,7 @@ along with GCC; see the file COPYING3. If not see The data structures would be more complex in order to work on all the variables in a single pass. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/tree-ssa-operands.cc b/gcc/tree-ssa-operands.cc index 1dbf6b9c7c4..a01aa51f1cc 100644 --- a/gcc/tree-ssa-operands.cc +++ b/gcc/tree-ssa-operands.cc @@ -17,6 +17,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/tree-ssa-phiprop.cc b/gcc/tree-ssa-phiprop.cc index 2a1cdae46d2..ded0a4e6fb3 100644 --- a/gcc/tree-ssa-phiprop.cc +++ b/gcc/tree-ssa-phiprop.cc @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/tree-ssa-pre.cc b/gcc/tree-ssa-pre.cc index 13f2c8a5420..7cbad301ceb 100644 --- a/gcc/tree-ssa-pre.cc +++ b/gcc/tree-ssa-pre.cc @@ -19,6 +19,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/tree-ssa-propagate.cc b/gcc/tree-ssa-propagate.cc index d96d0a9fe19..43b17606a16 100644 --- a/gcc/tree-ssa-propagate.cc +++ b/gcc/tree-ssa-propagate.cc @@ -18,6 +18,7 @@ along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/tree-ssa-reassoc.cc b/gcc/tree-ssa-reassoc.cc index 347350fc98d..a898658da34 100644 --- a/gcc/tree-ssa-reassoc.cc +++ b/gcc/tree-ssa-reassoc.cc @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/tree-ssa-sccvn.cc b/gcc/tree-ssa-sccvn.cc index 84a0c379695..d5db05341ee 100644 --- a/gcc/tree-ssa-sccvn.cc +++ b/gcc/tree-ssa-sccvn.cc @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/tree-ssa-scopedtables.cc b/gcc/tree-ssa-scopedtables.cc index c367d37fa9b..3f43b64e898 100644 --- a/gcc/tree-ssa-scopedtables.cc +++ b/gcc/tree-ssa-scopedtables.cc @@ -17,6 +17,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/tree-ssa-sink.cc b/gcc/tree-ssa-sink.cc index 8c551e42a4d..eace914e72b 100644 --- a/gcc/tree-ssa-sink.cc +++ b/gcc/tree-ssa-sink.cc @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/tree-ssa-strlen.cc b/gcc/tree-ssa-strlen.cc index ee60909aa21..25c0adabbcd 100644 --- a/gcc/tree-ssa-strlen.cc +++ b/gcc/tree-ssa-strlen.cc @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/tree-ssa-structalias.cc b/gcc/tree-ssa-structalias.cc index 73ba5aa6195..a6adec3b0b6 100644 --- a/gcc/tree-ssa-structalias.cc +++ b/gcc/tree-ssa-structalias.cc @@ -18,6 +18,7 @@ along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/tree-ssa-ter.cc b/gcc/tree-ssa-ter.cc index 9b338bd2695..890ad011084 100644 --- a/gcc/tree-ssa-ter.cc +++ b/gcc/tree-ssa-ter.cc @@ -19,6 +19,7 @@ along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/tree-ssa-uninit.cc b/gcc/tree-ssa-uninit.cc index 726684e472a..9c3c6878ac9 100644 --- a/gcc/tree-ssa-uninit.cc +++ b/gcc/tree-ssa-uninit.cc @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #define INCLUDE_STRING #include "config.h" #include "system.h" diff --git a/gcc/tree-ssa.cc b/gcc/tree-ssa.cc index f4fa4e98c5d..7c6807cdb98 100644 --- a/gcc/tree-ssa.cc +++ b/gcc/tree-ssa.cc @@ -17,6 +17,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/tree-ssanames.cc b/gcc/tree-ssanames.cc index ae6a0cd48fe..d138c1fe521 100644 --- a/gcc/tree-ssanames.cc +++ b/gcc/tree-ssanames.cc @@ -17,6 +17,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/tree-stdarg.cc b/gcc/tree-stdarg.cc index 33763cd3d11..79b549ad6fa 100644 --- a/gcc/tree-stdarg.cc +++ b/gcc/tree-stdarg.cc @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/tree-streamer-in.cc b/gcc/tree-streamer-in.cc index 2fa998d37f8..bf9df99efad 100644 --- a/gcc/tree-streamer-in.cc +++ b/gcc/tree-streamer-in.cc @@ -19,6 +19,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/tree-streamer-out.cc b/gcc/tree-streamer-out.cc index 2fdd914b166..93ef90542ce 100644 --- a/gcc/tree-streamer-out.cc +++ b/gcc/tree-streamer-out.cc @@ -19,6 +19,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/tree-streamer.cc b/gcc/tree-streamer.cc index 72e967a9861..0a80af774d6 100644 --- a/gcc/tree-streamer.cc +++ b/gcc/tree-streamer.cc @@ -20,6 +20,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/tree-switch-conversion.cc b/gcc/tree-switch-conversion.cc index 00426d40000..33023875ef9 100644 --- a/gcc/tree-switch-conversion.cc +++ b/gcc/tree-switch-conversion.cc @@ -22,6 +22,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA /* This file handles the lowering of GIMPLE_SWITCH to an indexed load, or a series of bit-test-and-branch expressions. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/tree-tailcall.cc b/gcc/tree-tailcall.cc index 1901b1a13f9..d188da79aaf 100644 --- a/gcc/tree-tailcall.cc +++ b/gcc/tree-tailcall.cc @@ -17,6 +17,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/tree-vrp.cc b/gcc/tree-vrp.cc index a19f8ec2426..c265672bf99 100644 --- a/gcc/tree-vrp.cc +++ b/gcc/tree-vrp.cc @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/tree.cc b/gcc/tree.cc index b40f4d31b2f..0e0dbee6325 100644 --- a/gcc/tree.cc +++ b/gcc/tree.cc @@ -27,6 +27,7 @@ along with GCC; see the file COPYING3. If not see It is intended to be language-independent but can occasionally calls language-dependent routines. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/ubsan.cc b/gcc/ubsan.cc index 76ca7a04265..ae48dc93475 100644 --- a/gcc/ubsan.cc +++ b/gcc/ubsan.cc @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/value-pointer-equiv.cc b/gcc/value-pointer-equiv.cc index cfb53ab4eee..3e415c5efea 100644 --- a/gcc/value-pointer-equiv.cc +++ b/gcc/value-pointer-equiv.cc @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/value-prof.cc b/gcc/value-prof.cc index ddb4b4e1ee5..61578bedf0a 100644 --- a/gcc/value-prof.cc +++ b/gcc/value-prof.cc @@ -17,6 +17,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/value-query.cc b/gcc/value-query.cc index 34499da1a98..d68ac5d4896 100644 --- a/gcc/value-query.cc +++ b/gcc/value-query.cc @@ -19,6 +19,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/value-range-pretty-print.cc b/gcc/value-range-pretty-print.cc index b11d6494774..cbd7bc5d5e1 100644 --- a/gcc/value-range-pretty-print.cc +++ b/gcc/value-range-pretty-print.cc @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/value-range-storage.cc b/gcc/value-range-storage.cc index d3d98f98d7b..b74ae7f0ad7 100644 --- a/gcc/value-range-storage.cc +++ b/gcc/value-range-storage.cc @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/value-range.cc b/gcc/value-range.cc index 3046232bbca..775e97da11c 100644 --- a/gcc/value-range.cc +++ b/gcc/value-range.cc @@ -19,6 +19,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/value-relation.cc b/gcc/value-relation.cc index d8a2ed920a8..5c7986e23fb 100644 --- a/gcc/value-relation.cc +++ b/gcc/value-relation.cc @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/var-tracking.cc b/gcc/var-tracking.cc index 08174669c26..5f1358c1ac2 100644 --- a/gcc/var-tracking.cc +++ b/gcc/var-tracking.cc @@ -85,6 +85,7 @@ */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/varpool.cc b/gcc/varpool.cc index e40504d1bd8..0b5d448f7c3 100644 --- a/gcc/varpool.cc +++ b/gcc/varpool.cc @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/vr-values.cc b/gcc/vr-values.cc index cf273a3fc62..6db17042a34 100644 --- a/gcc/vr-values.cc +++ b/gcc/vr-values.cc @@ -17,6 +17,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/wide-int-print.cc b/gcc/wide-int-print.cc index 3e02ee12308..c4ee7791bc3 100644 --- a/gcc/wide-int-print.cc +++ b/gcc/wide-int-print.cc @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/libgcc/libgcov-util.c b/libgcc/libgcov-util.c index f443408c4ab..e93f5859dc0 100644 --- a/libgcc/libgcov-util.c +++ b/libgcc/libgcov-util.c @@ -27,6 +27,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #define IN_GCOV_TOOL 1 +#define INCLUDE_MEMORY #include "libgcov.h" #include "intl.h" #include "diagnostic.h"