This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Work round what appears to be a bug in Sun C++ 5.8 2005/10/13
authorNicholas Clark <nick@ccl4.org>
Wed, 11 Apr 2007 07:39:21 +0000 (07:39 +0000)
committerNicholas Clark <nick@ccl4.org>
Wed, 11 Apr 2007 07:39:21 +0000 (07:39 +0000)
If we just cast GvSVn(gv) to void, it ignores evaluating it for
its side effect.

p4raw-id: //depot/perl@30903

gv.c

diff --git a/gv.c b/gv.c
index f48ef98..cbe521b 100644 (file)
--- a/gv.c
+++ b/gv.c
@@ -291,7 +291,11 @@ S_gv_init_sv(pTHX_ GV *gv, I32 sv_type)
     case SVt_PVGV:
        break;
     default:
-       (void)GvSVn(gv);
+       if(GvSVn(gv)) {
+           /* Work round what appears to be a bug in Sun C++ 5.8 2005/10/13
+              If we just cast GvSVn(gv) to void, it ignores evaluating it for
+              its side effect */
+       }
 #endif
     }
 }