Hi all,
why does this wrong code compile with clang++ 3.6 (g++ rejects it
correctly)?
class Abc
{
public:
virtual void foo() const = 0;
virtual ~Abc() {}
};
class Impl : public Abc {
public:
void foo() const {}
};
class B
{
public:
void bar(Abc o)
{
o.foo();
}
};
int main()
{
B b;
Impl i;
b.bar(i);
}
Hi all,
why does this wrong code compile with clang++ 3.6 (g++ rejects it
correctly)?
Yep. Looks like a bug to me. I think we had the same bug for return types
of abstract classes too & that was fixed a few months ago. Seems we haven't
fully flushed out these issues...
Hi all,
why does this wrong code compile with clang++ 3.6 (g++ rejects it
correctly)?
Yep. Looks like a bug to me. I think we had the same bug for return
types of abstract classes too & that was fixed a few months ago. Seems
we haven't fully flushed out these issues...
Is this already filed as bug? Or fixed in upstream version?
>
>
>
> Hi all,
>
> why does this wrong code compile with clang++ 3.6 (g++ rejects it
> correctly)?
>
>
> Yep. Looks like a bug to me. I think we had the same bug for return
> types of abstract classes too & that was fixed a few months ago. Seems
> we haven't fully flushed out these issues...
Is this already filed as bug? Or fixed in upstream version?
The abstract return type one I think was filed/fixed, but I can't find the
specific details.
The abstract parameter type you've described/shown here doesn't seem to be
filed or fixed. If you'd like to file a bug (llvm.org/bugs) that'd be great.
- David
>
>
>
> Hi all,
>
> why does this wrong code compile with clang++ 3.6 (g++ rejects it
> correctly)?
>
>
> Yep. Looks like a bug to me. I think we had the same bug for return
> types of abstract classes too & that was fixed a few months ago. Seems
> we haven't fully flushed out these issues...
Is this already filed as bug? Or fixed in upstream version?
The abstract return type one I think was filed/fixed, but I can't find
the specific details.
The abstract parameter type you've described/shown here doesn't seem to
be filed or fixed. If you'd like to file a bug (llvm.org/bugs
<http://llvm.org/bugs>) that'd be great.
Ok, just filed a new bug ...