]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Create namespace for modula2 debug tree routines.
authorGaius Mulley <gaiusmod2@gmail.com>
Tue, 6 Dec 2022 19:33:56 +0000 (19:33 +0000)
committerGaius Mulley <gaiusmod2@gmail.com>
Tue, 6 Dec 2022 19:33:56 +0000 (19:33 +0000)
gcc/m2/ChangeLog:

* m2/m2pp.cc: Create namespace modula2.
* m2/m2pp.h: Create namespace modula2.

Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
gcc/m2/m2pp.cc
gcc/m2/m2pp.h

index 6b9846ce834e3729d2cce6cb039e2dc5b4ff58cf..8d6dad6de22ec0f0e0c64d068b64cf91d3ee5d09 100644 (file)
@@ -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));
 }
+
+}
index 5bef04954fba1db09db95c23a0d7611221c0617d..67419c69ef530699de45fedbba690ea54406192e 100644 (file)
@@ -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