https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66847

            Bug ID: 66847
           Summary: Derived class calling protected base ctor using C++11
                    {brace} init = spurious access denied error
           Product: gcc
           Version: 4.9.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: db0451 at gmail dot com
  Target Milestone: ---

Created attachment 35953
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35953&action=edit
source file

Possible duplicate of 63151. Probably related to the still-outstanding 66617
and references therein.

G++ continues to have severe problems implementing the new {brace}
initialisation syntax.

The two problems I've observed so far seem to be instigated by use of virtual
inheritance elsewhere in the class hierarchy, though I am not certain whether
that is an essential component of the problem.

Attaching cpp and processed output demonstrating that:
- when {brace} call to protected parent ctor is used, G++ errors out and does
not allow compilation.
- Yet replacing that call with (parenthesis) syntax results in the proper
behaviour.

Similar to my previous ticket, maybe the same root cause.

Please advise when we can expect this to be fixed. It is a basic element of a
4-year-old standard. Users should not be discouraged from adopting relatively
up-to-date practices for fear that otherwise 'gold standard' compilers will not
be able to handle them. G++ is usually a role model for standards compliance!

Thanks,
D.

Reply via email to