This is the mail archive of the gcc-patches@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]
Other format: [Raw text]

[C++ patch]: Fix warnings.


Hi,
I noticed a couple of warnings, one indicating a thinko.
I've installed this obvious patch.

tested on i686-pc-linux-gnu.

nathan
-- 
Dr Nathan Sidwell   ::   http://www.codesourcery.com   ::   CodeSourcery LLC
         'But that's a lie.' - 'Yes it is. What's your point?'
nathan@codesourcery.com : http://www.cs.bris.ac.uk/~nathan/ : nathan@acm.org
2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>

	* class.c (convert_to_base): Correct check for error_mark_node.
	(create_vtable_ptr): Remove unused VFUNS_P parm.

Index: cp/class.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/class.c,v
retrieving revision 1.462
diff -c -3 -p -r1.462 class.c
*** cp/class.c	8 Aug 2002 05:48:34 -0000	1.462
--- cp/class.c	8 Aug 2002 10:12:39 -0000
*************** static void check_methods PARAMS ((tree)
*** 145,151 ****
  static void remove_zero_width_bit_fields PARAMS ((tree));
  static void check_bases PARAMS ((tree, int *, int *, int *));
  static void check_bases_and_members PARAMS ((tree, int *));
! static tree create_vtable_ptr PARAMS ((tree, int *, int *, tree *));
  static void layout_class_type PARAMS ((tree, int *, int *, tree *));
  static void fixup_pending_inline PARAMS ((tree));
  static void fixup_inline_methods PARAMS ((tree));
--- 145,151 ----
  static void remove_zero_width_bit_fields PARAMS ((tree));
  static void check_bases PARAMS ((tree, int *, int *, int *));
  static void check_bases_and_members PARAMS ((tree, int *));
! static tree create_vtable_ptr PARAMS ((tree, int *, tree *));
  static void layout_class_type PARAMS ((tree, int *, int *, tree *));
  static void fixup_pending_inline PARAMS ((tree));
  static void fixup_inline_methods PARAMS ((tree));
*************** convert_to_base (tree object, tree type,
*** 370,376 ****
    binfo = lookup_base (TREE_TYPE (object), type, 
  		       check_access ? ba_check : ba_ignore, 
  		       NULL);
!   if (!binfo || TREE_CODE (binfo) == error_mark_node)
      return error_mark_node;
  
    return build_base_path (PLUS_EXPR, object, binfo, /*nonnull=*/1);
--- 370,376 ----
    binfo = lookup_base (TREE_TYPE (object), type, 
  		       check_access ? ba_check : ba_ignore, 
  		       NULL);
!   if (!binfo || binfo == error_mark_node)
      return error_mark_node;
  
    return build_base_path (PLUS_EXPR, object, binfo, /*nonnull=*/1);
*************** check_bases_and_members (t, empty_p)
*** 4342,4351 ****
     on VIRTUALS_P.  */
  
  static tree
! create_vtable_ptr (t, empty_p, vfuns_p, virtuals_p)
       tree t;
       int *empty_p;
-      int *vfuns_p;
       tree *virtuals_p;
  {
    tree fn;
--- 4342,4350 ----
     on VIRTUALS_P.  */
  
  static tree
! create_vtable_ptr (t, empty_p, virtuals_p)
       tree t;
       int *empty_p;
       tree *virtuals_p;
  {
    tree fn;
*************** layout_class_type (t, empty_p, vfuns_p, 
*** 4789,4795 ****
    determine_primary_base (t, vfuns_p);
  
    /* Create a pointer to our virtual function table.  */
!   vptr = create_vtable_ptr (t, empty_p, vfuns_p, virtuals_p);
  
    /* The vptr is always the first thing in the class.  */
    if (vptr)
--- 4788,4794 ----
    determine_primary_base (t, vfuns_p);
  
    /* Create a pointer to our virtual function table.  */
!   vptr = create_vtable_ptr (t, empty_p, virtuals_p);
  
    /* The vptr is always the first thing in the class.  */
    if (vptr)

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