On 6/21/06, Steve Peters <[EMAIL PROTECTED]> wrote:
On Wed, Jun 21, 2006 at 09:07:35AM +0100, Steve Hay wrote:
> Steve Hay wrote:
> >Automated smoke report for 5.9.4 patch 28410
> >Mugwump.uk.radan.com:  Intel(R) Pentium(R) 4 CPU 3.40GHz(~3391 MHz) (x86/2
> >cpu)
> >    on        MSWin32 - WinXP/.Net SP2
> >    using     cl version 12.00.8804
> >    smoketime 6 hours 57 minutes (average 10 minutes 26 seconds)
> >
> >Summary: FAIL(Fm)
> >
> >..\regcomp.c(5183) : error C2143: syntax error : missing ';' before 'type'
>
> Broken by change 28405, fixed by change 28412.
>
> "PERL_UNUSED_ARG(depth);" expands to "((void)depth);", so it's the old
> code before declarations thing which VC++ doesn't allow again.
>
> I thought warnings levels for compilers on (some) other systems had been
> set to spot these?  Did I dream that?
>

gcc should, but didn't seem to when I compiled.  gcc must not be able to
recognize this kind of case.

PERL_UNUSED_ARG cant be used before a GET_RE_DEBUG_FLAGS_DECL;

Cheers,
yves

--
perl -Mre=debug -e "/just|another|perl|hacker/"
--- 28413\regcomp.c	2006-06-21 10:11:11.000000000 +0200
+++ 28413_\regcomp.c	2006-06-21 22:46:54.701117000 +0200
@@ -1052,10 +1052,11 @@
     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 @@
     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,12 @@
     U32 stopnow = 0;
 #ifdef DEBUGGING
     regnode *stop = scan;
+    GET_RE_DEBUG_FLAGS_DECL;
 #else
     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*. */
@@ -5182,10 +5185,11 @@
     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
-    GET_RE_DEBUG_FLAGS_DECL;
+
     DEBUG_PARSE("clas");
 
     /* Assume we are going to generate an ANYOF node. */
@@ -6154,10 +6158,10 @@
 {
     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;

Reply via email to