On Mon, Apr 25, 2005 at 11:44:45AM +0100, Nicholas Clark wrote:
> Line 2933 of the current maint pp_hot.c is:
> 
>       PAD_SET_CUR(padlist, CvDEPTH(cv));
> 
> On AIX, I'm getting warnings about illegal escapes.
> 
>         `sh  cflags "optimize='-g'" pp_hot.o`  pp_hot.c
>           CCCMD =  ccache cc -DPERL_CORE -c -D_ALL_SOURCE -D_ANSI_C_SOURCE 
> -D_POSIX_SOURCE -qmaxmem=-1 -qnoansialias -DUSE_NATIVE_DLOPEN -DDEBUGGING 
> -q64 -DUSE_64_BIT_ALL -q64 -g 
> "pp_hot.c", line 2933.510: 1506-235 (W) Incorrect escape sequence \(. \ 
> ignored.
> 
> 
> The line expands to this:
[ something not intended to be viewed by mortal man ]

I've "fixed" it with the following change. Perhaps I should replace it
with a function? Even though we don't like function calls in
pp-entersub.

-- 
That he said that that that that is is is debatable, is debatable.

Change 25042 by [EMAIL PROTECTED] on 2005/07/01 15:40:40

        the PAD_SET_CUR macro expanded too much for AIX compilers

Affected files ...

... //depot/perl/pad.h#13 edit
... //depot/perl/pp_ctl.c#463 edit
... //depot/perl/pp_sort.c#42 edit
... //depot/perl/pp_sys.c#428 edit

Differences ...

==== //depot/perl/pad.h#13 (text) ====

@@ -103,7 +103,12 @@
 
 =for apidoc m|void|PAD_SET_CUR |PADLIST padlist|I32 n
 Set the current pad to be pad C<n> in the padlist, saving
-the previous current pad.
+the previous current pad. NB currently this macro expands to a string too
+long for some compilers, so it's best to replace it with
+
+    SAVECOMPPAD();
+    PAD_SET_CUR_NOSAVE(padlist,n);
+
 
 =for apidoc m|void|PAD_SET_CUR_NOSAVE  |PADLIST padlist|I32 n
 like PAD_SET_CUR, but without the save

==== //depot/perl/pp_ctl.c#463 (text) ====

@@ -1778,7 +1778,8 @@
        PUSHSUB_DB(cx);
        cx->blk_sub.retop = PL_op->op_next;
        CvDEPTH(cv)++;
-       PAD_SET_CUR(CvPADLIST(cv),1);
+       SAVECOMPPAD();
+       PAD_SET_CUR_NOSAVE(CvPADLIST(cv), 1);
        RETURNOP(CvSTART(cv));
     }
     else
@@ -2417,7 +2418,8 @@
                        sub_crush_depth(cv);
                    pad_push(padlist, CvDEPTH(cv));
                }
-               PAD_SET_CUR(padlist, CvDEPTH(cv));
+               SAVECOMPPAD();
+               PAD_SET_CUR_NOSAVE(padlist, CvDEPTH(cv));
                if (cx->blk_sub.hasargs)
                {
                    AV* av = (AV*)PAD_SVl(0);

==== //depot/perl/pp_sort.c#42 (text) ====

@@ -1544,7 +1544,8 @@
                SAVEVPTR(CvROOT(cv)->op_ppaddr);
                CvROOT(cv)->op_ppaddr = PL_ppaddr[OP_NULL];
 
-               PAD_SET_CUR(CvPADLIST(cv), 1);
+               SAVECOMPPAD();
+               PAD_SET_CUR_NOSAVE(CvPADLIST(cv), 1);
             }
        }
     }

==== //depot/perl/pp_sys.c#428 (text) ====

@@ -1270,7 +1270,8 @@
     PUSHBLOCK(cx, CXt_FORMAT, PL_stack_sp);
     PUSHFORMAT(cx);
     cx->blk_sub.retop = retop;
-    PAD_SET_CUR(CvPADLIST(cv), 1);
+    SAVECOMPPAD();
+    PAD_SET_CUR_NOSAVE(CvPADLIST(cv), 1);
 
     setdefout(gv);         /* locally select filehandle so $% et al work */
     return CvSTART(cv);

Reply via email to