This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: g++ and 'public virtual'
- To: tw4 at irz301 dot inf dot tu-dresden dot de (Thomas Weise), egcs-bugs at cygnus dot com
- Subject: Re: g++ and 'public virtual'
- From: Jason Merrill <jason at cygnus dot com>
- Date: 02 Nov 1997 15:05:45 -0800
- References: <Pine.ULT.3.95.970917214818.11050A-100000.cygnus.egcs.bugs@irz301.inf.tu-dresden.de>
>>>>> Thomas Weise <tw4@irz301.inf.tu-dresden.de> writes:
> # > g++ oops.cc
> oops.cc: In method `void oops::__duplicate()':
> oops.cc:3: `void foo::__duplicate()' is protected
> oops.cc:17: within this context
This fixes the testcase without fixing the design flaw:
Sun Nov 2 15:04:12 1997 Jason Merrill <jason@yorick.cygnus.com>
* class.c (build_vbase_path): Propagate the result type properly.
Index: class.c
===================================================================
RCS file: /cvs/cvsfiles/devo/gcc/cp/class.c,v
retrieving revision 1.285
diff -c -r1.285 class.c
*** class.c 1997/10/20 18:45:44 1.285
--- class.c 1997/11/02 23:04:36
***************
*** 341,347 ****
if (null_expr)
{
TREE_OPERAND (expr, 2) = nonnull_expr;
! TREE_TYPE (TREE_OPERAND (expr, 1)) = TREE_TYPE (nonnull_expr);
}
else
expr = nonnull_expr;
--- 341,348 ----
if (null_expr)
{
TREE_OPERAND (expr, 2) = nonnull_expr;
! TREE_TYPE (expr) = TREE_TYPE (TREE_OPERAND (expr, 1))
! = TREE_TYPE (nonnull_expr);
}
else
expr = nonnull_expr;