From: Gaius Mulley Date: Tue, 6 Dec 2022 19:33:56 +0000 (+0000) Subject: Create namespace for modula2 debug tree routines. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e487d6fa028f890260b2d4a514e1ac1d997793a5;p=thirdparty%2Fgcc.git Create namespace for modula2 debug tree routines. gcc/m2/ChangeLog: * m2/m2pp.cc: Create namespace modula2. * m2/m2pp.h: Create namespace modula2. Signed-off-by: Gaius Mulley --- diff --git a/gcc/m2/m2pp.cc b/gcc/m2/m2pp.cc index 6b9846ce834e..8d6dad6de22e 100644 --- a/gcc/m2/m2pp.cc +++ b/gcc/m2/m2pp.cc @@ -42,6 +42,8 @@ along with GNU Modula-2; see the file COPYING3. If not see #define M2PP_C #include "m2/m2pp.h" +namespace modula2 { + #undef DEBUGGING typedef struct pretty_t @@ -342,7 +344,7 @@ pv (tree t) m2pp_print (state, ", abstract origin = "); m2pp_identifier (state, DECL_ABSTRACT_ORIGIN (t)); m2pp_print (state, ">\n"); - pv (DECL_ABSTRACT_ORIGIN (t)); + modula2::pv (DECL_ABSTRACT_ORIGIN (t)); } killPretty (state); } @@ -361,7 +363,7 @@ pv (tree t) m2pp_print (state, ", abstract origin = "); m2pp_identifier (state, DECL_ABSTRACT_ORIGIN (t)); m2pp_print (state, "> *)\n"); - pv (DECL_ABSTRACT_ORIGIN (t)); + modula2::pv (DECL_ABSTRACT_ORIGIN (t)); } killPretty (state); } @@ -2641,3 +2643,5 @@ m2pp_component_ref (pretty *s, tree t) m2pp_print (s, "."); m2pp_simple_expression (s, TREE_OPERAND (t, 1)); } + +} diff --git a/gcc/m2/m2pp.h b/gcc/m2/m2pp.h index 5bef04954fba..67419c69ef53 100644 --- a/gcc/m2/m2pp.h +++ b/gcc/m2/m2pp.h @@ -28,6 +28,7 @@ along with GNU Modula-2; see the file COPYING3. If not see # define EXTERN extern # endif +namespace modula2 { /* These functions allow a maintainer to dump the trees in Modula-2. */ EXTERN void pf (tree t); @@ -36,7 +37,7 @@ EXTERN void pt (tree t); EXTERN void ptl (tree t); EXTERN void pv (tree t); EXTERN void ptcl (tree t); - +} # undef EXTERN #endif