@@ -23,6 +23,7 @@
* *
****************************************************************************/
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -23,6 +23,7 @@
* *
****************************************************************************/
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -23,6 +23,7 @@
* *
****************************************************************************/
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#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);
}
@@ -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<pretty_printer> m_pp;
};
/* The class log_scope is an RAII-style class intended to make
@@ -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<pretty_printer> 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<pretty_printer> 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;
}
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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. */
@@ -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;
}
@@ -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<pretty_printer> 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. */
@@ -19,6 +19,7 @@ along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#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<pretty_printer> pp (global_dc->clone_printer ());
+ pp_printf (pp.get (), "%qT", type);
+ typstr = pp_formatted_text (pp.get ());
return typstr;
}
@@ -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"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#define INCLUDE_STRING
#include "config.h"
#include "system.h"
@@ -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"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#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<pretty_printer>
c_pretty_printer::clone () const
{
- return new c_pretty_printer (*this);
+ return ::make_unique<c_pretty_printer> (*this);
}
/* Print the tree T in full, on file FILE. */
@@ -51,7 +51,7 @@ class c_pretty_printer : public pretty_printer
{
public:
c_pretty_printer ();
- pretty_printer *clone () const override;
+ std::unique_ptr<pretty_printer> clone () const override;
// Format string, possibly translated.
void translate_string (const char *);
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#define INCLUDE_STRING
#include "config.h"
#include "system.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -18,6 +18,7 @@ along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#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
@@ -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"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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"
@@ -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"
@@ -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"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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"
@@ -19,6 +19,7 @@
<http://www.gnu.org/licenses/>. */
#include "config.h"
+#define INCLUDE_MEMORY
#define INCLUDE_STRING
#include "system.h"
#include "coretypes.h"
@@ -18,6 +18,7 @@
<http://www.gnu.org/licenses/>. */
#define INCLUDE_LIST
+#define INCLUDE_MEMORY
#define INCLUDE_VECTOR
#define INCLUDE_ALGORITHM
#include "config.h"
@@ -17,6 +17,7 @@
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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"
@@ -40,6 +40,7 @@
#define INCLUDE_ALGORITHM
#define INCLUDE_FUNCTIONAL
+#define INCLUDE_MEMORY
#define INCLUDE_ARRAY
#include "config.h"
#include "system.h"
@@ -19,6 +19,7 @@
#define IN_TARGET_CODE 1
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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"
@@ -23,6 +23,7 @@
#define IN_TARGET_CODE 1
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -19,6 +19,7 @@
#define IN_TARGET_CODE 1
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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"
@@ -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"
@@ -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"
@@ -19,6 +19,7 @@
#define IN_TARGET_CODE 1
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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"
@@ -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"
@@ -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"
@@ -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"
@@ -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"
@@ -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"
@@ -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"
@@ -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"
@@ -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"
@@ -20,6 +20,7 @@
#define IN_TARGET_CODE 1
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -29,6 +29,7 @@
#define IN_TARGET_CODE 1
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -20,6 +20,7 @@
#define IN_TARGET_CODE 1
+#define INCLUDE_MEMORY
#include "config.h"
#include <sstream>
#include "system.h"
@@ -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"
@@ -20,6 +20,7 @@
#define IN_TARGET_CODE 1
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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"
@@ -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"
@@ -19,6 +19,7 @@
#define IN_TARGET_CODE 1
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -22,6 +22,7 @@
#define IN_TARGET_CODE 1
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -29,6 +29,7 @@
#define IN_TARGET_CODE 1
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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"
@@ -17,6 +17,7 @@
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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"
@@ -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"
@@ -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"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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"
@@ -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
<http://www.gnu.org/licenses/>. */
+#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<pretty_printer>
cxx_pretty_printer::clone () const
{
- return new cxx_pretty_printer (*this);
+ return ::make_unique<cxx_pretty_printer> (*this);
}
@@ -34,7 +34,7 @@ class cxx_pretty_printer : public c_pretty_printer
public:
cxx_pretty_printer ();
- pretty_printer *clone () const override;
+ std::unique_ptr<pretty_printer> clone () const override;
void constant (tree) final override;
void id_expression (tree) final override;
@@ -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"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -21,6 +21,7 @@ along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -19,6 +19,7 @@ along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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"
@@ -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"
@@ -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"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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"
@@ -19,6 +19,7 @@ along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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"
@@ -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"
@@ -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"
@@ -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"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.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<diagnostic_per_format_buffer> m_per_format_buffer;
/* The number of buffered diagnostics of each kind. */
diagnostic_counters m_diagnostic_counters;
@@ -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<diagnostic_client_data_hooks> make_compiler_data_hooks ();
class diagnostic_client_plugin_info;
@@ -72,9 +72,10 @@ public:
diagnostic_output_format::dump (out, indent);
}
- diagnostic_per_format_buffer *make_per_format_buffer () final override
+ std::unique_ptr<diagnostic_per_format_buffer>
+ make_per_format_buffer () final override
{
- return new diagnostic_json_format_buffer (*this);
+ return ::make_unique<diagnostic_json_format_buffer> (*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. */
@@ -3409,9 +3409,10 @@ public:
diagnostic_output_format::dump (out, indent);
}
- diagnostic_per_format_buffer *make_per_format_buffer () final override
+ std::unique_ptr<diagnostic_per_format_buffer>
+ make_per_format_buffer () final override
{
- return new diagnostic_sarif_format_buffer (m_builder);
+ return ::make_unique<diagnostic_sarif_format_buffer> (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<test_urlifier> ());
rich_location richloc (line_table, UNKNOWN_LOCATION);
dc.report (DK_ERROR, richloc, nullptr, 0,
"foo %<-foption%> %<unrecognized%> bar");
@@ -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_per_format_buffer>
diagnostic_text_output_format::make_per_format_buffer ()
{
- return new diagnostic_text_format_buffer (*this);
+ return ::make_unique<diagnostic_text_format_buffer> (*this);
}
/* Implementation of diagnostic_output_format::on_report_diagnostic vfunc
@@ -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<diagnostic_per_format_buffer>
+ make_per_format_buffer () final override;
void set_buffer (diagnostic_per_format_buffer *) final override;
void on_begin_group () override {}
@@ -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<diagnostic_per_format_buffer>
+ 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
@@ -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"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -19,6 +19,7 @@ along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
#include "config.h"
+#define INCLUDE_MEMORY
#define INCLUDE_VECTOR
#include "system.h"
#include "coretypes.h"
@@ -19,6 +19,7 @@
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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<diagnostic_output_format> 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<diagnostic_client_data_hooks> 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<diagnostic_option_manager> 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> 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,14 +1796,8 @@ diagnostic_counters::clear ()
/* class diagnostic_buffer. */
diagnostic_buffer::diagnostic_buffer (diagnostic_context &ctxt)
-: m_ctxt (ctxt),
- m_per_format_buffer (nullptr)
-{
-}
-
-diagnostic_buffer::~diagnostic_buffer ()
+: m_ctxt (ctxt)
{
- delete m_per_format_buffer;
}
void
@@ -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 <memory> 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<diagnostic_output_format> 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<diagnostic_client_data_hooks> hooks);
+ void set_urlifier (std::unique_ptr<urlifier>);
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<diagnostic_option_manager> 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<pretty_printer> 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;
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -15,6 +15,7 @@
along with this program; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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"
@@ -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"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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"
@@ -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"
@@ -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"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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"
@@ -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"
@@ -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"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#define INCLUDE_VECTOR
#define INCLUDE_STRING
#include "config.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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"
@@ -19,6 +19,7 @@ along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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"
@@ -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"
@@ -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"
@@ -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"
@@ -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"
@@ -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"
@@ -19,6 +19,7 @@ along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -19,6 +19,7 @@ along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -20,6 +20,7 @@ along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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"
@@ -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"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#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<urlifier>
make_gcc_urlifier (unsigned int lang_mask)
{
- return new gcc_urlifier (lang_mask);
+ return ::make_unique<gcc_urlifier> (lang_mask);
}
#if CHECKING_P
@@ -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<urlifier> make_gcc_urlifier (unsigned int lang_mask);
#endif /* GCC_GCC_URLIFIER_H */
@@ -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"
@@ -17,6 +17,7 @@ along with Gcov; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
#include "config.h"
+#define INCLUDE_MEMORY
#define INCLUDE_VECTOR
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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++)
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "bconfig.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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"
@@ -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"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -20,6 +20,7 @@
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#define INCLUDE_STRING
#include "config.h"
#include "system.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -20,6 +20,7 @@ along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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"
@@ -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"
@@ -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"
@@ -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"
@@ -20,6 +20,7 @@
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#define INCLUDE_STRING
#include "config.h"
#include "system.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -19,6 +19,7 @@
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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"
@@ -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"
@@ -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"
@@ -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"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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"
@@ -19,6 +19,7 @@ along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
#define INCLUDE_ALGORITHM
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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"
@@ -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"
@@ -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"
@@ -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"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -19,6 +19,7 @@ along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
#include "config.h"
+#define INCLUDE_MEMORY
#define INCLUDE_MUTEX
#include "libgccjit.h"
#include "system.h"
@@ -19,6 +19,7 @@ along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
#include "config.h"
+#define INCLUDE_MEMORY
#define INCLUDE_SSTREAM
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -30,6 +30,7 @@
#define INCLUDE_ALGORITHM
#define INCLUDE_FUNCTIONAL
+#define INCLUDE_MEMORY
#define INCLUDE_ARRAY
#include "config.h"
#include "system.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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<lto_diagnostic_option_manager> (), 0);
if (atexit (lto_wrapper_cleanup) != 0)
fatal_error (input_location, "%<atexit%> failed");
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -18,6 +18,7 @@ along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
#include "config.h"
+#define INCLUDE_MEMORY
#define INCLUDE_VECTOR
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#define INCLUDE_STRING
#include "config.h"
#include "system.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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "libiberty.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.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
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.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
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.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
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.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
@@ -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
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.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
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.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
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.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
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.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
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.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
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.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
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.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
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.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
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.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
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.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
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.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
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.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
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.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
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.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
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.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
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.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
@@ -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
@@ -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
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.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
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.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
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.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
@@ -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
@@ -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
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.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
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.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
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.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
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.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
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.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
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.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
@@ -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
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.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
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.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
@@ -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
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.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
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.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
@@ -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
@@ -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
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.h>
@@ -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);
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.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
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.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
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.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
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.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
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.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
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.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
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.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
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.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
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.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
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.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
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.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
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.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
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.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
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.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
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.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
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.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
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.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
@@ -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
@@ -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 <https://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.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
@@ -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 <https://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.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
@@ -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 <https://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.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
@@ -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 <https://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.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
@@ -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 <https://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.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
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.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
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.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
@@ -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
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.h>
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.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
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.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
@@ -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
@@ -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)
@@ -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
@@ -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
@@ -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<Args__T1> (UnixArgs_GetArgV ());
while ((j < High) && ((*(*Source).array[i]).array[j] != ASCII_nul))
{
- a[j] = (*(*Source).array[i]).array[j];
+ const_cast<char *>(a)[j] = (*(*Source).array[i]).array[j];
j += 1;
}
}
if (j <= High)
{
- a[j] = ASCII_nul;
+ const_cast<char *>(a)[j] = ASCII_nul;
}
return i < (UnixArgs_GetArgC ());
/* static analysis guarentees a RETURN statement will be used before here. */
@@ -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
@@ -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"
@@ -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
@@ -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
@@ -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
@@ -34,9 +34,9 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#include <string.h>
#include <limits.h>
-#define _Debug_H
#define _Debug_C
+#include "GDebug.h"
# include "GASCII.h"
# include "GNumberIO.h"
# include "GStdIO.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
@@ -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
<http://www.gnu.org/licenses/>. */
-#include "config.h"
-#include "system.h"
#include <stdbool.h>
# 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 <stddef.h>
+#include <string.h>
+#include <limits.h>
+#include <stdlib.h>
# include "GStorage.h"
+#include <unistd.h>
#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<unsigned int> (high-o)), 0);
+ stop = Max (Min (MaxBuf, static_cast<unsigned int> (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<DynamicStrings_String__opaque> (s)->contents.buf.array[start], static_cast<unsigned int> (end-start));
+ ConcatContentsAddress (&t->contents, &static_cast<DynamicStrings_String__opaque> (s)->contents.buf.array[start], static_cast<unsigned int> (stop-start));
o += static_cast<DynamicStrings_String__opaque> (s)->contents.len;
s = static_cast<DynamicStrings_String> (static_cast<DynamicStrings_String__opaque> (s)->contents.next);
}
@@ -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
@@ -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
@@ -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<FIO__T7 *> (fd->buffer->address); /* provides easy access for reading characters */
+ fd->buffer->contents = static_cast<FIO__T7 *> (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<char *>(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<char *>(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<char *>(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<unsigned char *>(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<char *>(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<char *>(dest)[j] = (*p);
j += 1;
p += 1;
}
if (j < HighDest)
{
- dest[j] = ASCII_nul;
+ const_cast<char *>(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<char *>(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<char *>(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<char *>(dest)[j] = src[i];
i += 1;
j += 1;
}
}
if (j < HighDest)
{
- dest[j] = ASCII_nul;
+ const_cast<char *>(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<void*> (static_cast<const void*>(fname)), StrLib_StrLen ((const char *) fname, _fname_high), state, use, towrite, bufsize)) == f)
{
fd = static_cast<FIO_FileDescriptor> (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<void*> (static_cast<const void*>(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<void*> (static_cast<const void*>(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<void*> (static_cast<const void*>(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<void*> (static_cast<const void*>(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<void*> (static_cast<const void*>(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<char *>(a)[i] = ASCII_nul;
i += 1;
}
else
{
- a[i] = ch;
+ const_cast<char *>(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<char *>(a)[i] = (*p);
p += 1;
i += 1;
}
@@ -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
@@ -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
@@ -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
@@ -42,9 +42,9 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#include <stdlib.h>
#include <unistd.h>
-#define _IO_H
#define _IO_C
+#include "GIO.h"
# include "GStrLib.h"
# include "GSYSTEM.h"
# include "Glibc.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
@@ -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<Indexing_Index> (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<Indexing_Index__opaque> (i)->ArrayStart, static_cast<Indexing_Index__opaque> (i)->ArraySize);
Storage_DEALLOCATE ((void **) &i, sizeof (Indexing__T2));
- return NULL;
+ return static_cast<Indexing_Index> (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<Indexing_Index__opaque> (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<Indexing_Index__opaque> (i)->Low) && (n <= static_cast<Indexing_Index__opaque> (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<Indexing_Index__opaque> (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<Indexing_Index__opaque> (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<Indexing_Index__opaque> (i)->Low)
{
M2RTS_HALT (-1);
__builtin_unreachable ();
}
else
{
- oldSize = i->ArraySize;
- while (((n-i->Low)*sizeof (void *)) >= i->ArraySize)
+ oldSize = static_cast<Indexing_Index__opaque> (i)->ArraySize;
+ while (((n-static_cast<Indexing_Index__opaque> (i)->Low)*sizeof (void *)) >= static_cast<Indexing_Index__opaque> (i)->ArraySize)
{
- i->ArraySize = i->ArraySize*i->GrowFactor;
+ static_cast<Indexing_Index__opaque> (i)->ArraySize = static_cast<Indexing_Index__opaque> (i)->ArraySize*static_cast<Indexing_Index__opaque> (i)->GrowFactor;
}
- if (oldSize != i->ArraySize)
+ if (oldSize != static_cast<Indexing_Index__opaque> (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<Indexing_Index__opaque> (i)->ArrayStart, static_cast<Indexing_Index__opaque> (i)->ArraySize);
/* and initialize the remainder of the array to NIL */
- b = i->ArrayStart;
+ b = static_cast<Indexing_Index__opaque> (i)->ArrayStart;
b = reinterpret_cast<void *> (reinterpret_cast<char *> (b)+oldSize);
- b = libc_memset (b, 0, static_cast<size_t> (i->ArraySize-oldSize));
+ b = libc_memset (b, 0, static_cast<size_t> (static_cast<Indexing_Index__opaque> (i)->ArraySize-oldSize));
}
- i->High = n;
+ static_cast<Indexing_Index__opaque> (i)->High = n;
}
}
- b = i->ArrayStart;
- b = reinterpret_cast<void *> (reinterpret_cast<char *> (b)+(n-i->Low)*sizeof (void *));
+ b = static_cast<Indexing_Index__opaque> (i)->ArrayStart;
+ b = reinterpret_cast<void *> (reinterpret_cast<char *> (b)+(n-static_cast<Indexing_Index__opaque> (i)->Low)*sizeof (void *));
p = static_cast<PutIndice__T1> (b);
- (*p) = reinterpret_cast<unsigned int *> (a);
- i->Used += 1;
- if (i->Debug)
+ (*p) = static_cast<unsigned int *> (a);
+ static_cast<Indexing_Index__opaque> (i)->Used += 1;
+ if (static_cast<Indexing_Index__opaque> (i)->Debug)
{
if (n < 32)
{
- i->Map |= (1 << (n ));
+ static_cast<Indexing_Index__opaque> (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<Indexing_PtrToByte> (i->ArrayStart);
- b += (n-i->Low)*sizeof (void *);
+ b = static_cast<Indexing_PtrToByte> (static_cast<Indexing_Index__opaque> (i)->ArrayStart);
+ b += (n-static_cast<Indexing_Index__opaque> (i)->Low)*sizeof (void *);
p = (Indexing_PtrToAddress) (b);
- if (i->Debug)
+ if (static_cast<Indexing_Index__opaque> (i)->Debug)
{
- if (((n < 32) && (! ((((1 << (n)) & (i->Map)) != 0)))) && ((*p) != NULL))
+ if (((n < 32) && (! ((((1 << (n)) & (static_cast<Indexing_Index__opaque> (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<Indexing_PtrToByte> (i->ArrayStart);
- while (j <= i->High)
+ j = static_cast<Indexing_Index__opaque> (i)->Low;
+ b = static_cast<Indexing_PtrToByte> (static_cast<Indexing_Index__opaque> (i)->ArrayStart);
+ while (j <= static_cast<Indexing_Index__opaque> (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<Indexing_PtrToByte> (i->ArrayStart);
- while (j <= i->High)
+ j = static_cast<Indexing_Index__opaque> (i)->Low;
+ b = static_cast<Indexing_PtrToByte> (static_cast<Indexing_Index__opaque> (i)->ArrayStart);
+ while (j <= static_cast<Indexing_Index__opaque> (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<Indexing_PtrToByte> (i->ArrayStart);
- b += sizeof (void *)*(j-i->Low);
+ b = static_cast<Indexing_PtrToByte> (static_cast<Indexing_Index__opaque> (i)->ArrayStart);
+ b += sizeof (void *)*(j-static_cast<Indexing_Index__opaque> (i)->Low);
p = (Indexing_PtrToAddress) (b);
b += sizeof (void *);
- p = static_cast<Indexing_PtrToAddress> (libc_memmove (reinterpret_cast<void *> (p), reinterpret_cast<void *> (b), static_cast<size_t> ((i->High-j)*sizeof (void *))));
- i->High -= 1;
- i->Used -= 1;
+ p = static_cast<Indexing_PtrToAddress> (libc_memmove (reinterpret_cast <void *> (p), reinterpret_cast <void *> (b), static_cast<size_t> ((static_cast<Indexing_Index__opaque> (i)->High-j)*sizeof (void *))));
+ static_cast<Indexing_Index__opaque> (i)->High -= 1;
+ static_cast<Indexing_Index__opaque> (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<Indexing_Index__opaque> (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<Indexing_Index__opaque> (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<Indexing_Index__opaque> (i)->Low;
+ b = static_cast<Indexing_PtrToByte> (static_cast<Indexing_Index__opaque> (i)->ArrayStart);
+ while (j <= static_cast<Indexing_Index__opaque> (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 ();
}
@@ -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
@@ -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<Lists_List__opaque> ((*l))->NoOfElements = 0;
+ static_cast<Lists_List__opaque> ((*l))->Next = static_cast<Lists_List__opaque> (NULL);
}
@@ -179,9 +176,9 @@ extern "C" void Lists_KillList (Lists_List *l)
{
if ((*l) != NULL)
{
- if ((*l)->Next != NULL)
+ if (static_cast<Lists_List__opaque> ((*l))->Next != NULL)
{
- Lists_KillList (&(*l)->Next);
+ Lists_KillList (reinterpret_cast<Lists_List *> (&static_cast<Lists_List__opaque> ((*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<Lists_List__opaque> (l)->NoOfElements < MaxNoOfElements)
{
- l->NoOfElements += 1;
- l->Elements.array[l->NoOfElements-1] = c;
+ static_cast<Lists_List__opaque> (l)->NoOfElements += 1;
+ static_cast<Lists_List__opaque> (l)->Elements.array[static_cast<Lists_List__opaque> (l)->NoOfElements-1] = c;
}
- else if (l->Next != NULL)
+ else if (static_cast<Lists_List__opaque> (l)->Next != NULL)
{
/* avoid dangling else. */
- Lists_PutItemIntoList (l->Next, c);
+ Lists_PutItemIntoList (static_cast<Lists_List> (static_cast<Lists_List__opaque> (l)->Next), c);
}
else
{
/* avoid dangling else. */
- Lists_InitList (&l->Next);
- Lists_PutItemIntoList (l->Next, c);
+ Lists_InitList (reinterpret_cast<Lists_List *> (&static_cast<Lists_List__opaque> (l)->Next));
+ Lists_PutItemIntoList (static_cast<Lists_List> (static_cast<Lists_List__opaque> (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<Lists_List__opaque> (l)->NoOfElements)
{
- return l->Elements.array[n-1];
+ return static_cast<Lists_List__opaque> (l)->Elements.array[n-1];
}
else
{
- n -= l->NoOfElements;
+ n -= static_cast<Lists_List__opaque> (l)->NoOfElements;
}
- l = l->Next;
+ l = static_cast<Lists_List> (static_cast<Lists_List__opaque> (l)->Next);
}
return static_cast<unsigned int> (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<Lists_List__opaque> (l)->NoOfElements)
{
- if (l->Elements.array[i-1] == c)
+ if (static_cast<Lists_List__opaque> (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<Lists_List__opaque> (l)->NoOfElements+(Lists_GetIndexOfList (static_cast<Lists_List> (static_cast<Lists_List__opaque> (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<Lists_List__opaque> (l)->NoOfElements;
+ l = static_cast<Lists_List> (static_cast<Lists_List__opaque> (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<Lists_List__opaque> (NULL);
do {
i = 1;
- while ((i <= l->NoOfElements) && (l->Elements.array[i-1] != c))
+ while ((i <= static_cast<Lists_List__opaque> (l)->NoOfElements) && (static_cast<Lists_List__opaque> (l)->Elements.array[i-1] != c))
{
i += 1;
}
- if ((i <= l->NoOfElements) && (l->Elements.array[i-1] == c))
+ if ((i <= static_cast<Lists_List__opaque> (l)->NoOfElements) && (static_cast<Lists_List__opaque> (l)->Elements.array[i-1] == c))
{
Found = true;
}
else
{
- p = l;
- l = l->Next;
+ p = static_cast<Lists_List__opaque> (l);
+ l = static_cast<Lists_List> (static_cast<Lists_List__opaque> (l)->Next);
}
} while (! ((l == NULL) || Found));
if (Found)
{
- RemoveItem (p, l, i);
+ RemoveItem (p, static_cast<Lists_List__opaque> (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<Lists_List__opaque> (l)->NoOfElements)
{
- if (l->Elements.array[i-1] == c)
+ if (static_cast<Lists_List__opaque> (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<Lists_List> (static_cast<Lists_List__opaque> (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<Lists_List *> (&m));
n = Lists_NoOfItemsInList (l);
i = 1;
while (i <= n)
{
- Lists_PutItemIntoList (m, Lists_GetItemFromList (l, i));
+ Lists_PutItemIntoList (static_cast<Lists_List> (m), Lists_GetItemFromList (l, i));
i += 1;
}
- return m;
+ return static_cast<Lists_List> (m);
/* static analysis guarentees a RETURN statement will be used before here. */
__builtin_unreachable ();
}
@@ -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
@@ -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<char *>(str)[i] = ASCII_nl;
j = i+1;
while (j < high)
{
- str[j] = str[j+1];
+ const_cast<char *>(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<void*> (static_cast<const void*>(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<M2Dependent_PtrToChar> (cstr), reinterpret_cast<M2Dependent_PtrToChar> (&str), StrLib_StrLen ((const char *) str, _str_high))) == 0;
+ return (strncmp (reinterpret_cast <M2Dependent_PtrToChar> (cstr), reinterpret_cast <M2Dependent_PtrToChar> (const_cast<void*> (static_cast<const void*>(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<SetupDebugFlags__T1> (libc_getenv (const_cast<void*> (reinterpret_cast<const void*>("GCC_M2LINK_RTFLAG"))));
+ pc = static_cast<SetupDebugFlags__T1> (libc_getenv (const_cast<void*> (static_cast<const void*>("GCC_M2LINK_RTFLAG"))));
while ((pc != NULL) && ((*pc) != ASCII_nul))
{
if (equal (reinterpret_cast<void *> (pc), (const char *) "all", 3))
@@ -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
@@ -34,14 +34,12 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#include <limits.h>
# 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<void*> (reinterpret_cast<const void*>("../../gcc/m2/gm2-libs/M2EXCEPTION.mod")), 47, 6, const_cast<void*> (reinterpret_cast<const void*>("M2Exception")), const_cast<void*> (reinterpret_cast<const void*>("current coroutine is not in the exceptional execution state")));
+ RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_exException)), const_cast<void*> (static_cast<const void*>("../../gcc/m2/gm2-libs/M2EXCEPTION.mod")), 47, 6, const_cast<void*> (static_cast<const void*>("M2Exception")), const_cast<void*> (static_cast<const void*>("current coroutine is not in the exceptional execution state")));
}
else
{
@@ -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
@@ -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
<http://www.gnu.org/licenses/>. */
-#include "config.h"
-#include "system.h"
#include <stdbool.h>
# 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 <string.h>
+#include <limits.h>
+#include <stdlib.h>
+#include <unistd.h>
#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.
@@ -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
@@ -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<char *>(a)[i] = (*p);
p += 1;
i += 1;
}
if (i <= higha)
{
- a[i] = ASCII_nul;
+ const_cast<char *>(a)[i] = ASCII_nul;
}
}
@@ -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
@@ -43,9 +43,9 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#include <string.h>
#include <limits.h>
#include <stdlib.h>
-#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<char *>(a)[j] = ' ';
j += 1;
n -= 1;
}
while ((i > 0) && (j <= Higha))
{
- a[j] = ((char) (buf.array[i-1]+ ((unsigned int) ('0'))));
+ const_cast<char *>(a)[j] = ((char) (buf.array[i-1]+ ((unsigned int) ('0'))));
j += 1;
i -= 1;
}
if (j <= Higha)
{
- a[j] = ASCII_nul;
+ const_cast<char *>(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<char *>(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<char *>(a)[j] = ((char) (buf.array[i-1]+ ((unsigned int) ('0'))));
}
else
{
- a[j] = ((char) ((buf.array[i-1]+ ((unsigned int) ('A')))-10));
+ const_cast<char *>(a)[j] = ((char) ((buf.array[i-1]+ ((unsigned int) ('A')))-10));
}
j += 1;
i -= 1;
}
if (j <= Higha)
{
- a[j] = ASCII_nul;
+ const_cast<char *>(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<char *>(a)[j] = ' ';
j += 1;
n -= 1;
}
if (Negative)
{
- a[j] = '-';
+ const_cast<char *>(a)[j] = '-';
j += 1;
}
while ((i != 0) && (j <= Higha))
{
- a[j] = ((char) (buf.array[i-1]+ ((unsigned int) ('0'))));
+ const_cast<char *>(a)[j] = ((char) (buf.array[i-1]+ ((unsigned int) ('0'))));
j += 1;
i -= 1;
}
if (j <= Higha)
{
- a[j] = ASCII_nul;
+ const_cast<char *>(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<char *>(a)[j] = ' ';
j += 1;
n -= 1;
}
while ((i > 0) && (j <= Higha))
{
- a[j] = ((char) (buf.array[i-1]+ ((unsigned int) ('0'))));
+ const_cast<char *>(a)[j] = ((char) (buf.array[i-1]+ ((unsigned int) ('0'))));
j += 1;
i -= 1;
}
if (j <= Higha)
{
- a[j] = ASCII_nul;
+ const_cast<char *>(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<char *>(a)[j] = ' ';
j += 1;
n -= 1;
}
while ((i > 0) && (j <= Higha))
{
- a[j] = ((char) (buf.array[i-1]+ ((unsigned int) ('0'))));
+ const_cast<char *>(a)[j] = ((char) (buf.array[i-1]+ ((unsigned int) ('0'))));
j += 1;
i -= 1;
}
if (j <= Higha)
{
- a[j] = ASCII_nul;
+ const_cast<char *>(a)[j] = ASCII_nul;
}
}
@@ -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
@@ -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"
@@ -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
@@ -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"
@@ -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
@@ -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<int> (libc_write (2, &a, static_cast<size_t> (StrLib_StrLen ((const char *) a, _a_high))));
+ n = static_cast<int> (libc_write (2, const_cast<void*> (static_cast<const void*>(a)), static_cast<size_t> (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<void *> (f);
+ return static_cast<void *> (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<void*> (reinterpret_cast<const void*>("../../gcc/m2/gm2-libs/RTExceptions.mod")), 614, 9, const_cast<void*> (reinterpret_cast<const void*>("indexf")), const_cast<void*> (reinterpret_cast<const void*>("array index out of bounds")));
+ RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_indexException)), const_cast<void*> (static_cast<const void*>("../../gcc/m2/gm2-libs/RTExceptions.mod")), 614, 9, const_cast<void*> (static_cast<const void*>("indexf")), const_cast<void*> (static_cast<const void*>("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<void*> (reinterpret_cast<const void*>("../../gcc/m2/gm2-libs/RTExceptions.mod")), 626, 9, const_cast<void*> (reinterpret_cast<const void*>("range")), const_cast<void*> (reinterpret_cast<const void*>("assignment out of range")));
+ RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_rangeException)), const_cast<void*> (static_cast<const void*>("../../gcc/m2/gm2-libs/RTExceptions.mod")), 626, 9, const_cast<void*> (static_cast<const void*>("range")), const_cast<void*> (static_cast<const void*>("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<void*> (reinterpret_cast<const void*>("../../gcc/m2/gm2-libs/RTExceptions.mod")), 638, 9, const_cast<void*> (reinterpret_cast<const void*>("casef")), const_cast<void*> (reinterpret_cast<const void*>("case selector out of range")));
+ RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_caseSelectException)), const_cast<void*> (static_cast<const void*>("../../gcc/m2/gm2-libs/RTExceptions.mod")), 638, 9, const_cast<void*> (static_cast<const void*>("casef")), const_cast<void*> (static_cast<const void*>("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<void*> (reinterpret_cast<const void*>("../../gcc/m2/gm2-libs/RTExceptions.mod")), 650, 9, const_cast<void*> (reinterpret_cast<const void*>("invalidloc")), const_cast<void*> (reinterpret_cast<const void*>("invalid address referenced")));
+ RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_invalidLocation)), const_cast<void*> (static_cast<const void*>("../../gcc/m2/gm2-libs/RTExceptions.mod")), 650, 9, const_cast<void*> (static_cast<const void*>("invalidloc")), const_cast<void*> (static_cast<const void*>("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<void*> (reinterpret_cast<const void*>("../../gcc/m2/gm2-libs/RTExceptions.mod")), 662, 9, const_cast<void*> (reinterpret_cast<const void*>("function")), const_cast<void*> (reinterpret_cast<const void*>("... function ... "))); /* --fixme-- what has happened ? */
+ RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_functionException)), const_cast<void*> (static_cast<const void*>("../../gcc/m2/gm2-libs/RTExceptions.mod")), 662, 9, const_cast<void*> (static_cast<const void*>("function")), const_cast<void*> (static_cast<const void*>("... 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<void*> (reinterpret_cast<const void*>("../../gcc/m2/gm2-libs/RTExceptions.mod")), 674, 9, const_cast<void*> (reinterpret_cast<const void*>("wholevalue")), const_cast<void*> (reinterpret_cast<const void*>("illegal whole value exception")));
+ RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_wholeValueException)), const_cast<void*> (static_cast<const void*>("../../gcc/m2/gm2-libs/RTExceptions.mod")), 674, 9, const_cast<void*> (static_cast<const void*>("wholevalue")), const_cast<void*> (static_cast<const void*>("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<void*> (reinterpret_cast<const void*>("../../gcc/m2/gm2-libs/RTExceptions.mod")), 686, 9, const_cast<void*> (reinterpret_cast<const void*>("wholediv")), const_cast<void*> (reinterpret_cast<const void*>("illegal whole value exception")));
+ RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_wholeDivException)), const_cast<void*> (static_cast<const void*>("../../gcc/m2/gm2-libs/RTExceptions.mod")), 686, 9, const_cast<void*> (static_cast<const void*>("wholediv")), const_cast<void*> (static_cast<const void*>("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<void*> (reinterpret_cast<const void*>("../../gcc/m2/gm2-libs/RTExceptions.mod")), 698, 9, const_cast<void*> (reinterpret_cast<const void*>("realvalue")), const_cast<void*> (reinterpret_cast<const void*>("illegal real value exception")));
+ RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_realValueException)), const_cast<void*> (static_cast<const void*>("../../gcc/m2/gm2-libs/RTExceptions.mod")), 698, 9, const_cast<void*> (static_cast<const void*>("realvalue")), const_cast<void*> (static_cast<const void*>("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<void*> (reinterpret_cast<const void*>("../../gcc/m2/gm2-libs/RTExceptions.mod")), 710, 9, const_cast<void*> (reinterpret_cast<const void*>("realdiv")), const_cast<void*> (reinterpret_cast<const void*>("real number division by zero exception")));
+ RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_realDivException)), const_cast<void*> (static_cast<const void*>("../../gcc/m2/gm2-libs/RTExceptions.mod")), 710, 9, const_cast<void*> (static_cast<const void*>("realdiv")), const_cast<void*> (static_cast<const void*>("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<void*> (reinterpret_cast<const void*>("../../gcc/m2/gm2-libs/RTExceptions.mod")), 722, 9, const_cast<void*> (reinterpret_cast<const void*>("complexvalue")), const_cast<void*> (reinterpret_cast<const void*>("illegal complex value exception")));
+ RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_complexValueException)), const_cast<void*> (static_cast<const void*>("../../gcc/m2/gm2-libs/RTExceptions.mod")), 722, 9, const_cast<void*> (static_cast<const void*>("complexvalue")), const_cast<void*> (static_cast<const void*>("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<void*> (reinterpret_cast<const void*>("../../gcc/m2/gm2-libs/RTExceptions.mod")), 734, 9, const_cast<void*> (reinterpret_cast<const void*>("complexdiv")), const_cast<void*> (reinterpret_cast<const void*>("complex number division by zero exception")));
+ RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_complexDivException)), const_cast<void*> (static_cast<const void*>("../../gcc/m2/gm2-libs/RTExceptions.mod")), 734, 9, const_cast<void*> (static_cast<const void*>("complexdiv")), const_cast<void*> (static_cast<const void*>("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<void*> (reinterpret_cast<const void*>("../../gcc/m2/gm2-libs/RTExceptions.mod")), 746, 9, const_cast<void*> (reinterpret_cast<const void*>("protection")), const_cast<void*> (reinterpret_cast<const void*>("protection exception")));
+ RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_protException)), const_cast<void*> (static_cast<const void*>("../../gcc/m2/gm2-libs/RTExceptions.mod")), 746, 9, const_cast<void*> (static_cast<const void*>("protection")), const_cast<void*> (static_cast<const void*>("protection exception")));
}
@@ -845,7 +842,7 @@ static void protection (void * a)
static void systemf (void * a)
{
- RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_sysException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc/m2/gm2-libs/RTExceptions.mod")), 758, 9, const_cast<void*> (reinterpret_cast<const void*>("systemf")), const_cast<void*> (reinterpret_cast<const void*>("system exception")));
+ RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_sysException)), const_cast<void*> (static_cast<const void*>("../../gcc/m2/gm2-libs/RTExceptions.mod")), 758, 9, const_cast<void*> (static_cast<const void*>("systemf")), const_cast<void*> (static_cast<const void*>("system exception")));
}
@@ -855,7 +852,7 @@ static void systemf (void * a)
static void coroutine (void * a)
{
- RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_coException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc/m2/gm2-libs/RTExceptions.mod")), 770, 9, const_cast<void*> (reinterpret_cast<const void*>("coroutine")), const_cast<void*> (reinterpret_cast<const void*>("coroutine exception")));
+ RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_coException)), const_cast<void*> (static_cast<const void*>("../../gcc/m2/gm2-libs/RTExceptions.mod")), 770, 9, const_cast<void*> (static_cast<const void*>("coroutine")), const_cast<void*> (static_cast<const void*>("coroutine exception")));
}
@@ -865,7 +862,7 @@ static void coroutine (void * a)
static void exception (void * a)
{
- RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_exException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc/m2/gm2-libs/RTExceptions.mod")), 782, 9, const_cast<void*> (reinterpret_cast<const void*>("exception")), const_cast<void*> (reinterpret_cast<const void*>("exception exception")));
+ RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_exException)), const_cast<void*> (static_cast<const void*>("../../gcc/m2/gm2-libs/RTExceptions.mod")), 782, 9, const_cast<void*> (static_cast<const void*>("exception")), const_cast<void*> (static_cast<const void*>("exception exception")));
}
@@ -877,8 +874,8 @@ static void Init (void)
{
inException = false;
freeHandler = NULL;
- freeEHB = NULL;
- currentEHB = RTExceptions_InitExceptionBlock ();
+ freeEHB = static_cast<RTExceptions_EHBlock__opaque> (NULL);
+ currentEHB = static_cast<RTExceptions_EHBlock__opaque> (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_EHBlock__opaque> (RTExceptions_KillExceptionBlock (static_cast<RTExceptions_EHBlock> (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<RTExceptions_EHBlock__opaque> (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<RTExceptions_EHBlock> (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<RTExceptions_EHBlock__opaque> (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<RTExceptions_EHBlock__opaque> (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<RTExceptions_EHBlock__opaque> (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<RTExceptions_EHBlock> (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<RTExceptions_EHBlock__opaque> (e)->handlers = KillHandlers (static_cast<RTExceptions_EHBlock__opaque> (e)->handlers);
+ static_cast<RTExceptions_EHBlock__opaque> (e)->right = freeEHB;
+ freeEHB = static_cast<RTExceptions_EHBlock__opaque> (e);
+ return static_cast<RTExceptions_EHBlock> (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<RTExceptions_EHBlock__opaque> (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<RTExceptions_EHBlock__opaque> (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<RTExceptions_EHBlock__opaque> (e), number);
if (h != NULL)
{
/* remove, h, */
SubHandler (h);
if (h->stack != NULL)
{
- AddHandler (e, h->stack);
+ AddHandler (static_cast<RTExceptions_EHBlock__opaque> (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<int> (libc_write (2, RTExceptions_GetTextBuffer (e), libc_strlen (RTExceptions_GetTextBuffer (e))));
+ e = static_cast<RTExceptions_EHBlock__opaque> (RTExceptions_GetExceptionBlock ());
+ n = static_cast<int> (libc_write (2, RTExceptions_GetTextBuffer (static_cast<RTExceptions_EHBlock> (e)), libc_strlen (RTExceptions_GetTextBuffer (static_cast<RTExceptions_EHBlock> (e)))));
M2RTS_HALT (-1);
__builtin_unreachable ();
}
@@ -1187,7 +1184,7 @@ extern "C" RTExceptions_EHBlock RTExceptions_GetBaseExceptionBlock (void)
}
else
{
- return currentEHB;
+ return static_cast<RTExceptions_EHBlock> (currentEHB);
}
ReturnException ("../../gcc/m2/gm2-libs/RTExceptions.def", 25, 1);
__builtin_unreachable ();
@@ -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
@@ -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
@@ -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
@@ -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"
@@ -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
@@ -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
@@ -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
@@ -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;
@@ -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
@@ -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);
@@ -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
@@ -34,9 +34,9 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#include <string.h>
#include <limits.h>
-#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<char *>(b)[i] = StrCase_Cap (a[i]);
i += 1;
}
if (i < highb)
{
- b[i] = ASCII_nul;
+ const_cast<char *>(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<char *>(b)[i] = StrCase_Lower (a[i]);
i += 1;
}
if (i < highb)
{
- b[i] = ASCII_nul;
+ const_cast<char *>(b)[i] = ASCII_nul;
}
}
@@ -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
@@ -38,9 +38,9 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#include <string.h>
#include <limits.h>
-#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<char *>(a)[n] = ASCII_nul;
n += 1;
}
else if (ch == ASCII_ff)
{
/* avoid dangling else. */
- a[0] = ch;
+ const_cast<char *>(a)[0] = ch;
if (high > 0)
{
- a[1] = ASCII_nul;
+ const_cast<char *>(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<char *>(a)[n] = ch;
n += 1;
}
else if (ch == ASCII_eof)
{
/* avoid dangling else. */
- a[n] = ch;
+ const_cast<char *>(a)[n] = ch;
n += 1;
ch = ASCII_cr;
if (n <= high)
{
- a[n] = ASCII_nul;
+ const_cast<char *>(a)[n] = ASCII_nul;
}
}
}
@@ -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
@@ -42,9 +42,9 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#include <string.h>
#include <limits.h>
-#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<char *>(c)[i] = b[j];
i += 1;
j += 1;
}
if (i <= Highc)
{
- c[i] = ASCII_nul;
+ const_cast<char *>(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<char *>(dest)[n] = src[n];
n += 1;
}
if (n <= HighDest)
{
- dest[n] = ASCII_nul;
+ const_cast<char *>(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<char *>(b)[j] = a[i];
i += 1;
j += 1;
}
if (j <= highb)
{
- b[j] = ASCII_nul;
+ const_cast<char *>(b)[j] = ASCII_nul;
}
}
@@ -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
@@ -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
@@ -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
<http://www.gnu.org/licenses/>. */
-#include "config.h"
-#include "system.h"
#include <stdbool.h>
# 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 <stddef.h>
# include "GStorage.h"
#if defined(__cplusplus)
# undef NULL
@@ -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
@@ -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
@@ -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<void*> (reinterpret_cast<const void*>("M2DEBUG_SYSSTORAGE_trace")))) != NULL;
+ trace = (libc_getenv (const_cast<void*> (static_cast<const void*>("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<void*> (reinterpret_cast<const void*>("M2DEBUG_SYSSTORAGE_zero")))) != NULL;
+ zero = (libc_getenv (const_cast<void*> (static_cast<const void*>("M2DEBUG_SYSSTORAGE_zero")))) != NULL;
}
else
{
@@ -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
@@ -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
@@ -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
@@ -37,9 +37,9 @@ along with GNU Modula-2; see the file COPYING3. If not see
#include <string.h>
#include <limits.h>
-#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;
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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 <stdlib.h>
+# include <sys/types.h>
# 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.
@@ -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
@@ -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<char *>(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<char *>(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<char *>(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<char *>(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<char *>(dest)[j] = src[i];
i += 1;
j += 1;
}
if (j < HighDest)
{
- dest[j] = ASCII_nul;
+ const_cast<char *>(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;
@@ -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
@@ -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
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
-
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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"
@@ -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"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -18,6 +18,7 @@
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
@@ -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
@@ -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
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#define INCLUDE_STRING
#include "config.h"
#include "system.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "intl.h"
@@ -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"
@@ -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"
@@ -18,6 +18,7 @@
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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"
@@ -2519,10 +2519,10 @@ pretty_printer::~pretty_printer ()
/* Base class implementation of pretty_printer::clone vfunc. */
-pretty_printer *
+std::unique_ptr<pretty_printer>
pretty_printer::clone () const
{
- return new pretty_printer (*this);
+ return ::make_unique<pretty_printer> (*this);
}
/* Append a string delimited by START and END to the output area of
@@ -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 <memory> 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<pretty_printer> clone () const;
void set_output_stream (FILE *outfile)
{
@@ -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"
@@ -18,6 +18,7 @@ along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -19,6 +19,7 @@
#define INCLUDE_ALGORITHM
#define INCLUDE_FUNCTIONAL
+#define INCLUDE_MEMORY
#define INCLUDE_ARRAY
#include "config.h"
#include "system.h"
@@ -19,6 +19,7 @@
#define INCLUDE_ALGORITHM
#define INCLUDE_FUNCTIONAL
+#define INCLUDE_MEMORY
#define INCLUDE_ARRAY
#include "config.h"
#include "system.h"
@@ -19,6 +19,7 @@
#define INCLUDE_ALGORITHM
#define INCLUDE_FUNCTIONAL
+#define INCLUDE_MEMORY
#define INCLUDE_ARRAY
#include "config.h"
#include "system.h"
@@ -19,6 +19,7 @@
#define INCLUDE_ALGORITHM
#define INCLUDE_FUNCTIONAL
+#define INCLUDE_MEMORY
#define INCLUDE_ARRAY
#include "config.h"
#include "system.h"
@@ -19,6 +19,7 @@
#define INCLUDE_ALGORITHM
#define INCLUDE_FUNCTIONAL
+#define INCLUDE_MEMORY
#define INCLUDE_ARRAY
#include "config.h"
#include "system.h"
@@ -19,6 +19,7 @@
#define INCLUDE_ALGORITHM
#define INCLUDE_FUNCTIONAL
+#define INCLUDE_MEMORY
#define INCLUDE_ARRAY
#include "config.h"
#include "system.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -16,6 +16,7 @@
// along with GCC; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
+#define INCLUDE_MEMORY
#include "rust-ast-resolve-expr.h"
#include "rust-ast-resolve-stmt.h"
#include "rust-ast-resolve-struct-expr-field.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.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
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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"
@@ -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"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -19,6 +19,7 @@
#define INCLUDE_ALGORITHM
#define INCLUDE_ARRAY
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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 <math.h>
@@ -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"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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<test_output_format> (*global_dc));
pass_info.pass = new pass_test_groups (g);
pass_info.reference_pass_name = "*warn_function_noreturn";
@@ -689,9 +689,10 @@ public:
diagnostic_output_format::dump (out, indent);
}
- diagnostic_per_format_buffer *make_per_format_buffer () final override
+ std::unique_ptr<diagnostic_per_format_buffer>
+ make_per_format_buffer () final override
{
- return new diagnostic_xhtml_format_buffer (m_builder);
+ return ::make_unique<diagnostic_xhtml_format_buffer> (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<xhtml_stream_output_format> (*global_dc,
+ line_table,
+ stderr));
#if CHECKING_P
selftest::xhtml_format_selftests ();
@@ -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"
@@ -19,6 +19,7 @@ along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
#include "config.h"
+#define INCLUDE_MEMORY
#define INCLUDE_VECTOR
#include "system.h"
#include "coretypes.h"
@@ -19,6 +19,7 @@ along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
#include "config.h"
+#define INCLUDE_MEMORY
#define INCLUDE_VECTOR
#include "system.h"
#include "coretypes.h"
@@ -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"
@@ -19,6 +19,7 @@ along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
#include "config.h"
+#define INCLUDE_MEMORY
#define INCLUDE_VECTOR
#include "system.h"
#include "coretypes.h"
@@ -19,6 +19,7 @@ along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
#include "config.h"
+#define INCLUDE_MEMORY
#define INCLUDE_VECTOR
#include "system.h"
#include "coretypes.h"
@@ -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<compiler_diagnostic_option_manager> (*global_dc,
+ lang_mask,
+ &global_options),
lang_mask);
global_dc->set_urlifier (make_gcc_urlifier (lang_mask));
@@ -19,6 +19,7 @@
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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<diagnostic_client_data_hooks>
make_compiler_data_hooks ()
{
- return new compiler_data_hooks ();
+ return ::make_unique<compiler_data_hooks> ();
}
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -17,6 +17,7 @@
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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"
@@ -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"
@@ -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"
@@ -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"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -18,6 +18,7 @@
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -18,6 +18,7 @@
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -19,6 +19,7 @@ along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#define INCLUDE_STRING
#include "config.h"
#include "system.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -85,6 +85,7 @@
*/
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -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"