I have a fix ready for the following bug:

Bug ID: 6368554
Synopsis: extra backslash in 5.6.1 vWARN
Category: utility
Subcategory : perl

Description: The vWARN macro in
usr/src/cmd/perl/5.6.1/distrib/regcomp.c has a backslash on the last
line of the macro.  This backslash is not needed, and it's a
maintenance hazard.  If somebody puts non-null text on the line
following the macro, it will get sucked into the macro definition.

#define vWARN(loc,m)                                                         \
    STMT_START {                                                             \
        unsigned offset = strlen(PL_regprecomp)-(PL_regxend-(loc));          \
        Perl_warner(aTHX_ WARN_REGEXP, "%s" REPORT_LOCATION,\
                 m, (int)offset, PL_regprecomp, PL_regprecomp + offset);        
  \
    } STMT_END                                                               \


The diff -u output of the fix is:

--- regcomp.c.orig      Wed Jan  9 00:28:16 2008
+++ regcomp.c   Wed Jan  9 00:30:06 2008
@@ -348,7 +348,7 @@
         unsigned offset = strlen(PL_regprecomp)-(PL_regxend-(loc));          \
        Perl_warner(aTHX_ WARN_REGEXP, "%s" REPORT_LOCATION,\
                 m, (int)offset, PL_regprecomp, PL_regprecomp + offset);        
  \
-    } STMT_END                                                               \
+    } STMT_END


 #define        vWARN2(loc, m, a1)                                              
     \

I would request someone to sponsor this bug. I have already submitted
my Sun Contributor Agreement and I am awaiting my SCA number.

Regards
Souvik Das Gupta

Reply via email to