# New Ticket Created by  Steve Peters 
# Please include the string:  [perl #44795]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=44795 >


Here's some additional cleanups for the IMCC compiler when compiling
Parrot with g++.

Enjoy!

Steve Peters
[EMAIL PROTECTED]
Index: compilers/imcc/cfg.c
===================================================================
--- compilers/imcc/cfg.c        (revision 20734)
+++ compilers/imcc/cfg.c        (working copy)
@@ -319,8 +319,8 @@
 
             for (pred = bb->pred_list; pred; pred = pred->next) {
                 int found = 0;
+                SymReg * const r = pred->from->end->r[0];
                 if (strcmp(pred->from->end->op, "bsr") == 0) {
-                    SymReg * const r = pred->from->end->r[0];
                     int j;
 
                     sub = pred->to->start;
Index: compilers/imcc/imclexer.c
===================================================================
--- compilers/imcc/imclexer.c   (revision 20734)
+++ compilers/imcc/imclexer.c   (working copy)
@@ -5648,7 +5648,11 @@
         frame->s.file = str_dup(name);
         /* whitespace can be savely ignored */
         do {
+#ifdef __cplusplus
+            c = yyinput(yyscanner);
+#else
             c = input(yyscanner);
+#endif
         } while (c == ' ' || c == '\t');
 
         if (c != '(') {
Index: compilers/imcc/imcc.l
===================================================================
--- compilers/imcc/imcc.l       (revision 20734)
+++ compilers/imcc/imcc.l       (working copy)
@@ -978,7 +978,11 @@
         frame->s.file = str_dup(name);
         /* whitespace can be savely ignored */
         do {
+#ifdef __cplusplus
+            c = yyinput(yyscanner);
+#else
             c = input(yyscanner);
+#endif
         } while (c == ' ' || c == '\t');
 
         if (c != '(') {

Reply via email to