This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Protected constructor access rules changed?
- To: Rick Campbell <campbell at cyberpass dot net>
- Subject: Re: Protected constructor access rules changed?
- From: Mark Mitchell <mmitchell at usa dot net>
- Date: Wed, 4 Feb 1998 08:57:52 GMT
- Cc: mrs at wrs dot com (Mike Stump), egcs-bugs at cygnus dot com
- References: <199802030119.RAA13059@kankakee.wrs.com><9802041441.AA28294@cfdevx1.lehman.com>
- Reply-To: mmitchell at usa dot net
>>>>> "Rick" == Rick Campbell <campbell@cyberpass.net> writes:
Rick> Date: Mon, 2 Feb 1998 17:19:00 -0800 From: mrs@wrs.com
Rick> (Mike Stump)
Rick> The place to ask about validity of code is comp.lang.c++
Rick> or comp.std.c++, or gnu.g++.help.
Rick> I'm sorry if I presented things poorly. I meant to be
Rick> reporting a bug, but also to leave open the possibility that
Rick> it was correct behavior that I was misunderstanding.
Rick> Unless there has been some change in the language, EGCS has
Rick> a bug in that it does not permit derived classes to invoke
Rick> protected constructors except in an initializer form. I
Constructors may not be called by name, except in the initializers
portion of a derived class constructor. I *think* this has been true
since the ARM, but I could be wrong. So, I don't believe there is a
bug here.
Rick> don't believe that there is a distinction wrt the spec
Rick> between calling such a constructor from an initializer and
Rick> calling it from the body. G++ 2.7.2 exhibits the same bug
Rick> which was introduced sometime after version 2.3.3 which
Rick> correctly compiles the example that I included in my last
Rick> message.
Rick> Rick
--
Mark Mitchell mmitchell@usa.net
Stanford University http://www.stanford.edu