Error in the formulation of the new warning, spotted by Dominic Dunlop
[p5sagit/p5-mst-13.2.git] / regcomp.c
index a0acc09..4de5727 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -1052,10 +1052,11 @@ S_make_trie_failtable(pTHX_ RExC_state_t *pRExC_state, regnode *source,  regnode
     U32 *fail;
     reg_ac_data *aho;
     const U32 data_slot = add_data( pRExC_state, 1, "T" );
+    GET_RE_DEBUG_FLAGS_DECL;
 #ifndef DEBUGGING
     PERL_UNUSED_ARG(depth);
 #endif    
-    GET_RE_DEBUG_FLAGS_DECL;
+
 
     ARG_SET( stclass, data_slot );
     Newxz( aho, 1, reg_ac_data );
@@ -1150,9 +1151,11 @@ S_make_trie(pTHX_ RExC_state_t *pRExC_state, regnode *startbranch, regnode *firs
     STRLEN trie_charcount=0;
     /*U32 trie_laststate=0;*/
     AV *trie_revcharmap;
-    PERL_UNUSED_ARG(depth);
 #endif
     GET_RE_DEBUG_FLAGS_DECL;
+#ifndef DEBUGGING
+    PERL_UNUSED_ARG(depth);
+#endif
 
     Newxz( trie, 1, reg_trie_data );
     trie->refcount = 1;
@@ -1873,12 +1876,14 @@ S_join_exact(pTHX_ RExC_state_t *pRExC_state, regnode *scan, I32 *min, U32 flags
     U32 stopnow = 0;
 #ifdef DEBUGGING
     regnode *stop = scan;
+    GET_RE_DEBUG_FLAGS_DECL;
 #else
+    PERL_UNUSED_ARG(depth);
+#endif
+#ifndef EXPERIMENTAL_INPLACESCAN
     PERL_UNUSED_ARG(flags);
     PERL_UNUSED_ARG(val);
-    PERL_UNUSED_ARG(depth);
 #endif
-    GET_RE_DEBUG_FLAGS_DECL;
     DEBUG_PEEP("join",scan,depth);
     
     /* Skip NOTHING, merge EXACT*. */
@@ -1891,7 +1896,6 @@ S_join_exact(pTHX_ RExC_state_t *pRExC_state, regnode *scan, I32 *min, U32 flags
         if (OP(n) == TAIL || n > next)
             stringok = 0;
         if (PL_regkind[OP(n)] == NOTHING) {
-        
             DEBUG_PEEP("skip:",n,depth);
             NEXT_OFF(scan) += NEXT_OFF(n);
             next = n + NODE_STEP_REGNODE;
@@ -1922,17 +1926,17 @@ S_join_exact(pTHX_ RExC_state_t *pRExC_state, regnode *scan, I32 *min, U32 flags
             if (stopnow) break;
         }
 
-#ifdef  EXPERIMENTAL_INPLACESCAN
-        if (flags && !NEXT_OFF(n)) {
-            DEBUG_PEEP("atch",val,depth);            
-            if (reg_off_by_arg[OP(n)]) {
-               ARG_SET(n, val - n);
-            }
-            else {
-               NEXT_OFF(n) = val - n;
-            }
-            stopnow=1;
-        }            
+#ifdef EXPERIMENTAL_INPLACESCAN
+       if (flags && !NEXT_OFF(n)) {
+           DEBUG_PEEP("atch", val, depth);
+           if (reg_off_by_arg[OP(n)]) {
+               ARG_SET(n, val - n);
+           }
+           else {
+               NEXT_OFF(n) = val - n;
+           }
+           stopnow = 1;
+       }
 #endif
     }
     
@@ -3385,7 +3389,7 @@ reStudy:
                if (OP(first) == IFMATCH) {
                    first = NEXTOPER(first);
                    first += EXTRA_STEP_2ARGS;
-               } else  /*xxx possible optimisation for /(?=)/*/
+               } else  /* XXX possible optimisation for /(?=)/  */
                    first = NEXTOPER(first);
        }
 
@@ -5177,15 +5181,16 @@ S_regclass(pTHX_ RExC_state_t *pRExC_state, U32 depth)
 #ifdef EBCDIC
     UV literal_endpoint = 0;
 #endif
-#ifndef DEBUGGING
-    PERL_UNUSED_ARG(depth);
-#endif
     UV stored = 0;  /* number of chars stored in the class */
 
     regnode * const orig_emit = RExC_emit; /* Save the original RExC_emit in
         case we need to change the emitted regop to an EXACT. */
     const char * orig_parse = RExC_parse;
     GET_RE_DEBUG_FLAGS_DECL;
+#ifndef DEBUGGING
+    PERL_UNUSED_ARG(depth);
+#endif
+
     DEBUG_PARSE("clas");
 
     /* Assume we are going to generate an ANYOF node. */
@@ -6154,10 +6159,10 @@ S_regtail(pTHX_ RExC_state_t *pRExC_state, regnode *p, const regnode *val,U32 de
 {
     dVAR;
     register regnode *scan;
+    GET_RE_DEBUG_FLAGS_DECL;
 #ifndef DEBUGGING
     PERL_UNUSED_ARG(depth);
 #endif
-    GET_RE_DEBUG_FLAGS_DECL;
 
     if (SIZE_ONLY)
        return;