This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Silence the g++ warnings "right-hand operand of comma has no effect"
authorNicholas Clark <nick@ccl4.org>
Tue, 10 Apr 2007 19:39:01 +0000 (19:39 +0000)
committerNicholas Clark <nick@ccl4.org>
Tue, 10 Apr 2007 19:39:01 +0000 (19:39 +0000)
p4raw-id: //depot/perl@30900

perl.c
perly.act
perly.h
perly.y
regcomp.c

diff --git a/perl.c b/perl.c
index c59f8e9..c3f9e88 100644 (file)
--- a/perl.c
+++ b/perl.c
@@ -3554,14 +3554,14 @@ S_init_main_stash(pTHX)
     SvREADONLY_on(gv);
     PL_incgv = gv_HVadd(gv_AVadd(gv_fetchpvs("INC", GV_ADD|GV_NOTQUAL,
                                             SVt_PVAV)));
-    SvREFCNT_inc_simple(PL_incgv); /* Don't allow it to be freed */
+    SvREFCNT_inc_simple_void(PL_incgv); /* Don't allow it to be freed */
     GvMULTI_on(PL_incgv);
     PL_hintgv = gv_fetchpvs("\010", GV_ADD|GV_NOTQUAL, SVt_PV); /* ^H */
     GvMULTI_on(PL_hintgv);
     PL_defgv = gv_fetchpvs("_", GV_ADD|GV_NOTQUAL, SVt_PVAV);
-    SvREFCNT_inc_simple(PL_defgv);
+    SvREFCNT_inc_simple_void(PL_defgv);
     PL_errgv = gv_HVadd(gv_fetchpvs("@", GV_ADD|GV_NOTQUAL, SVt_PV));
-    SvREFCNT_inc_simple(PL_errgv);
+    SvREFCNT_inc_simple_void(PL_errgv);
     GvMULTI_on(PL_errgv);
     PL_replgv = gv_fetchpvs("\022", GV_ADD|GV_NOTQUAL, SVt_PV); /* ^R */
     GvMULTI_on(PL_replgv);
index 02aa650..159ebf6 100644 (file)
--- a/perly.act
+++ b/perly.act
@@ -454,7 +454,7 @@ case 2:
 
   case 61:
 #line 506 "perly.y"
-    { SvREFCNT_inc(PL_compcv);
+    { SvREFCNT_inc_simple_void(PL_compcv);
 #ifdef MAD
                          (yyval.opval) = newFORM((ps[(2) - (4)].val.ival), (ps[(3) - (4)].val.opval), (ps[(4) - (4)].val.opval));
                          prepend_madprops((ps[(1) - (4)].val.i_tkval)->tk_mad, (yyval.opval), 'F');
@@ -479,7 +479,7 @@ case 2:
 
   case 64:
 #line 525 "perly.y"
-    { SvREFCNT_inc(PL_compcv);
+    { SvREFCNT_inc_simple_void(PL_compcv);
 #ifdef MAD
                          (yyval.opval) = newMYSUB((ps[(2) - (6)].val.ival), (ps[(3) - (6)].val.opval), (ps[(4) - (6)].val.opval), (ps[(5) - (6)].val.opval), (ps[(6) - (6)].val.opval));
                          token_getmad((ps[(1) - (6)].val.i_tkval),(yyval.opval),'d');
@@ -492,7 +492,7 @@ case 2:
 
   case 65:
 #line 538 "perly.y"
-    { SvREFCNT_inc(PL_compcv);
+    { SvREFCNT_inc_simple_void(PL_compcv);
 #ifdef MAD
                          OP* o = newSVOP(OP_ANONCODE, 0,
                            (SV*)newATTRSUB((ps[(2) - (6)].val.ival), (ps[(3) - (6)].val.opval), (ps[(4) - (6)].val.opval), (ps[(5) - (6)].val.opval), (ps[(6) - (6)].val.opval)));
@@ -620,7 +620,7 @@ case 2:
 
   case 81:
 #line 645 "perly.y"
-    { SvREFCNT_inc(PL_compcv);
+    { SvREFCNT_inc_simple_void(PL_compcv);
 #ifdef MAD
                          (yyval.opval) = utilize(IVAL((ps[(1) - (7)].val.i_tkval)), (ps[(2) - (7)].val.ival), (ps[(4) - (7)].val.opval), (ps[(5) - (7)].val.opval), (ps[(6) - (7)].val.opval));
                          token_getmad((ps[(1) - (7)].val.i_tkval),(yyval.opval),'o');
@@ -757,7 +757,7 @@ case 2:
 
   case 97:
 #line 751 "perly.y"
-    { SvREFCNT_inc(PL_compcv);
+    { SvREFCNT_inc_simple_void(PL_compcv);
                          (yyval.opval) = newANONATTRSUB((ps[(2) - (3)].val.ival), 0, Nullop, (ps[(3) - (3)].val.opval)); ;}
     break;
 
@@ -1113,7 +1113,7 @@ case 2:
 
   case 140:
 #line 1005 "perly.y"
-    { SvREFCNT_inc(PL_compcv);
+    { SvREFCNT_inc_simple_void(PL_compcv);
                          (yyval.opval) = newANONATTRSUB((ps[(2) - (5)].val.ival), (ps[(3) - (5)].val.opval), (ps[(4) - (5)].val.opval), (ps[(5) - (5)].val.opval));
                          TOKEN_GETMAD((ps[(1) - (5)].val.i_tkval),(yyval.opval),'o');
                          OP_GETMAD((ps[(3) - (5)].val.opval),(yyval.opval),'s');
diff --git a/perly.h b/perly.h
index 73dc4b8..f442416 100644 (file)
--- a/perly.h
+++ b/perly.h
@@ -203,7 +203,7 @@ typedef union YYSTYPE
     TOKEN* tkval;
 #endif
 }
-/* Line 1529 of yacc.c.  */
+/* Line 1489 of yacc.c.  */
        YYSTYPE;
 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
 # define YYSTYPE_IS_DECLARED 1
diff --git a/perly.y b/perly.y
index 9ca64a8..5abfa5a 100644 (file)
--- a/perly.y
+++ b/perly.y
@@ -503,7 +503,7 @@ peg :       PEG
        ;
 
 format :       FORMAT startformsub formname block
-                       { SvREFCNT_inc(PL_compcv);
+                       { SvREFCNT_inc_simple_void(PL_compcv);
 #ifdef MAD
                          $$ = newFORM($2, $3, $4);
                          prepend_madprops($1->tk_mad, $$, 'F');
@@ -522,7 +522,7 @@ formname:   WORD            { $$ = $1; }
 
 /* Unimplemented "my sub foo { }" */
 mysubrout:     MYSUB startsub subname proto subattrlist subbody
-                       { SvREFCNT_inc(PL_compcv);
+                       { SvREFCNT_inc_simple_void(PL_compcv);
 #ifdef MAD
                          $$ = newMYSUB($2, $3, $4, $5, $6);
                          token_getmad($1,$$,'d');
@@ -535,7 +535,7 @@ mysubrout:  MYSUB startsub subname proto subattrlist subbody
 
 /* Subroutine definition */
 subrout        :       SUB startsub subname proto subattrlist subbody
-                       { SvREFCNT_inc(PL_compcv);
+                       { SvREFCNT_inc_simple_void(PL_compcv);
 #ifdef MAD
                          OP* o = newSVOP(OP_ANONCODE, 0,
                            (SV*)newATTRSUB($2, $3, $4, $5, $6));
@@ -642,7 +642,7 @@ package :   PACKAGE WORD ';'
 use    :       USE startsub
                        { CvSPECIAL_on(PL_compcv); /* It's a BEGIN {} */ }
                    WORD WORD listexpr ';'
-                       { SvREFCNT_inc(PL_compcv);
+                       { SvREFCNT_inc_simple_void(PL_compcv);
 #ifdef MAD
                          $$ = utilize(IVAL($1), $2, $4, $5, $6);
                          token_getmad($1,$$,'o');
@@ -748,7 +748,7 @@ listop      :       LSTOP indirob argexpr /* map {...} @args or print $fh @args */
                          TOKEN_GETMAD($4,$$,')');
                        }
        |       LSTOPSUB startanonsub block /* sub f(&@);   f { foo } ... */
-                       { SvREFCNT_inc(PL_compcv);
+                       { SvREFCNT_inc_simple_void(PL_compcv);
                          $<opval>$ = newANONATTRSUB($2, 0, Nullop, $3); }
                    listexpr            %prec LSTOP  /* ... @bar */
                        { $$ = newUNOP(OP_ENTERSUB, OPf_STACKED,
@@ -1002,7 +1002,7 @@ anonymous:        '[' expr ']'
                          TOKEN_GETMAD($3,$$,'}');
                        }
        |       ANONSUB startanonsub proto subattrlist block    %prec '('
-                       { SvREFCNT_inc(PL_compcv);
+                       { SvREFCNT_inc_simple_void(PL_compcv);
                          $$ = newANONATTRSUB($2, $3, $4, $5);
                          TOKEN_GETMAD($1,$$,'o');
                          OP_GETMAD($3,$$,'s');
index 688bbc6..e24d146 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -4749,7 +4749,7 @@ Perl_reg_named_buff_get(pTHX_ const REGEXP * const rx, SV* namesv, U32 flags)
                     ret = newSVsv(&PL_sv_undef);
                 }
                 if (retarray) {
-                    SvREFCNT_inc(ret);
+                    SvREFCNT_inc_simple_void(ret);
                     av_push(retarray, ret);
                 }
             }
@@ -5131,7 +5131,7 @@ S_reg(pTHX_ RExC_state_t *pRExC_state, I32 paren, I32 *flagp,U32 depth)
                     if (!SIZE_ONLY) {
                         num = add_data( pRExC_state, 1, "S" );
                         RExC_rxi->data->data[num]=(void*)sv_dat;
-                        SvREFCNT_inc(sv_dat);
+                        SvREFCNT_inc_simple_void(sv_dat);
                     }
                     RExC_sawback = 1;
                     ret = reganode(pRExC_state,
@@ -5466,7 +5466,7 @@ S_reg(pTHX_ RExC_state_t *pRExC_state, I32 paren, I32 *flagp,U32 depth)
                    if (!SIZE_ONLY) {
                         num = add_data( pRExC_state, 1, "S" );
                         RExC_rxi->data->data[num]=(void*)sv_dat;
-                        SvREFCNT_inc(sv_dat);
+                        SvREFCNT_inc_simple_void(sv_dat);
                     }
                     ret = reganode(pRExC_state,NGROUPP,num);
                     goto insert_if_check_paren;
@@ -6664,7 +6664,7 @@ tryagain:
                 if (!SIZE_ONLY) {
                     num = add_data( pRExC_state, 1, "S" );
                     RExC_rxi->data->data[num]=(void*)sv_dat;
-                    SvREFCNT_inc(sv_dat);
+                    SvREFCNT_inc_simple_void(sv_dat);
                 }
 
                 RExC_sawback = 1;