This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: g++ and 'public virtual'


>>>>> 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;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]