craigberry at mac
May 6, 2012, 4:48 PM
clang++ seems to need only an extra set of parentheses to calm down and let go of its anxieties:
Re: [perl #112786] perlbug AutoReply: build broken under clang++
% git diff
diff --git a/sv.c b/sv.c
index 3ac2fd8..1713977 100644
@@ -13966,7 +13966,7 @@ Perl_varname(pTHX_ const GV *const gv, const char gvtype, PADOFFSET targ,
- CV * const cv = gv ? (CV *)gv : find_runcv(NULL);
+ CV * const cv = gv ? ((CV *)gv) : find_runcv(NULL);
IMO, something like this ought to go in for 5.16.0 because it is a build failure, and clang++ is a compiler, and someone not knowing any better might try to compile Perl with it.
Those dozens or hundreds of you who actually use C++ at the day job and/or know something about C++ parsing rules may want to chime in about whether clang++ has gone slightly bonkers or is just living out its identity as its own eccentric, hypersensitive C++ self.
 Thanks to Apple's XCode, an increasingly ubiquitous one.