nick at ccl4
May 8, 2012, 4:11 AM
Post #3 of 3
On Mon, May 07, 2012 at 11:46:56AM +0200, Leon Timmermans wrote:
Re: [perl #112786] perlbug AutoReply: build broken under clang++
[In reply to]
> On Mon, May 7, 2012 at 1:48 AM, Craig A. Berry <craigberry [at] mac> wrote:
> > 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.
> I suspect it's clang++ being bonkers.
I installed clang-3.0 from macports, and its clang++ is equally bonkers.
clang-3.1 seems to be due for release in the next week or so, but I admit
that I didn't feel like pegging the CPU for the better part of another hour
to build a pre-release version just to find out if it's changed (yet).
> A nested name specifier is sort of C++'s equivalent of a namespace.
> Such namespaces are introduced not only by the namespace keyword, but
> also by types. In this case, it's struct gv that's confusing clang++.
> I haven't looked up the exact rules, but I really don't think it
> should be confused, it should just backtrack and interpret gv as an
> unqualified name. My hunch would be that it's some kind of faulty
> heuristic acting up (triggered by a colon after a valid typename).
For me, I also got 4 errors from the same part of the statement. That's
less than awesome - most unusual for clang, which raise the bar on the
standard of error messages.