This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
pad.c: Avoid struct name followed by colon
authorFather Chrysostomos <sprout@cpan.org>
Thu, 11 Sep 2014 05:06:10 +0000 (22:06 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Mon, 15 Sep 2014 13:19:33 +0000 (06:19 -0700)
Some old clang++ versions have trouble with this.  See ticket #112786.

pad.c

diff --git a/pad.c b/pad.c
index 3d0171e..0b10575 100644 (file)
--- a/pad.c
+++ b/pad.c
@@ -2250,7 +2250,7 @@ Perl_cv_name(pTHX_ CV *cv, SV *sv)
        return sv ? (sv) : (SV *)cv;
     }
     {
-       SV * const retsv = sv ? sv : sv_newmortal();
+       SV * const retsv = sv ? (sv) : sv_newmortal();
        if (SvTYPE(cv) == SVt_PVCV) {
            if (CvNAMED(cv)) {
                if (CvLEXICAL(cv)) sv_sethek(retsv, CvNAME_HEK(cv));