This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/66847] Derived class calling protected base ctor using C++11 {brace} init = spurious access denied error
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 22 Jul 2015 11:37:41 +0000
- Subject: [Bug c++/66847] Derived class calling protected base ctor using C++11 {brace} init = spurious access denied error
- Auto-submitted: auto-generated
- References: <bug-66847-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66847
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target|=x86_64-w64-mingw32 |
Status|UNCONFIRMED |NEW
Last reconfirmed| |2015-07-22
Host|=x86_64-w64-mingw32 |
Ever confirmed|0 |1
Known to fail| |5.1.1, 6.0
Build|4.9.2 |
--- Comment #6 from Jonathan Wakely <redi at gcc dot gnu.org> ---
This seems different enough to PR 63151 and PR 66617 to warrant it's own PR.
Reduced:
struct VBase { };
class Base
: public virtual VBase
{
protected:
Base(int, int)
{}
};
struct Derived : Base
{
Derived()
:
Base{1, 1}
{}
};
Derived myDerived;
x.cc: In constructor âDerived::Derived()â:
x.cc:15:12: error: âBase::Base(int, int)â is protected within this context
Base{1, 1}
^
x.cc:7:2: note: declared protected here
Base(int, int)
^