summaryrefslogtreecommitdiff
path: root/sv.c
diff options
context:
space:
mode:
authorCraig A. Berry <craigberry@mac.com>2012-05-24 00:54:57 -0700
committerFather Chrysostomos <sprout@cpan.org>2012-05-24 00:57:19 -0700
commitef5eb418bf9cb919bb2d82393f4570a790061e2e (patch)
tree138323dbb9acd9440bf096c6c65a71c4f1bb6514 /sv.c
parent9aa9a8882056ff874c474002548b48c19610592f (diff)
downloadperl-ef5eb418bf9cb919bb2d82393f4570a790061e2e.tar.gz
[perl #112786] Fix build under clang++
A line of code in sv.c last modified at <http://perl5.git.perl.org/perl.git/commit/c6fb3f6e3e5160581b7?f=sv.c> causes clang++ to fall down hard when building blead: sv.c:13969:32: error: unexpected ':' in nested name specifier CV * const cv = gv ? (CV *)gv : find_runcv(NULL); ^ :: sv.c:13969:34: error: no member named 'Perl_find_runcv' in 'gv' CV * const cv = gv ? (CV *)gv : find_runcv(NULL); ~~~~ ^ ./embed.h:137:24: note: expanded from macro 'find_runcv' #define find_runcv(a) Perl_find_runcv(aTHX_ a) ^ sv.c:13969:50: error: expected ':' CV * const cv = gv ? (CV *)gv : find_runcv(NULL); ^ : sv.c:13969:21: note: to match this '?' CV * const cv = gv ? (CV *)gv : find_runcv(NULL); ^ sv.c:13969:50: error: expected expression CV * const cv = gv ? (CV *)gv : find_runcv(NULL); ^ 14 warnings and 4 errors generated. make: *** [sv.o] Error 1 clang++ seems to need only an extra set of parentheses to calm down and let go of its anxieties. [Committer’s note: Leon Timmermans points out that it's struct gv that's confusing clang++. So a struct name used as a variable cannot be followed by a colon.]
Diffstat (limited to 'sv.c')
-rw-r--r--sv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sv.c b/sv.c
index c96a81d948..65f0e79a78 100644
--- a/sv.c
+++ b/sv.c
@@ -13957,7 +13957,7 @@ Perl_varname(pTHX_ const GV *const gv, const char gvtype, PADOFFSET targ,
}
}
else {
- CV * const cv = gv ? (CV *)gv : find_runcv(NULL);
+ CV * const cv = gv ? ((CV *)gv) : find_runcv(NULL);
SV *sv;
AV *av;