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]

[C++ PATCH]: code cleanup


Hi,
I've installed this on both the branch and mainline which cleans up some
things I found in my wanderings. I've treated these as typos, and invoked
the obvious rule.

built & 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
2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>

	* cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
	section.
	* init.c (emit_base_init): Remove incorrect comment about
	virtual bases.
	* method.c (make_thunk): Fix comment alignment.

Index: cp/cp-tree.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cp/cp-tree.h,v
retrieving revision 1.564
diff -c -3 -p -r1.564 cp-tree.h
*** cp-tree.h	2001/01/19 09:24:11	1.564
--- cp-tree.h	2001/01/19 12:57:49
*************** extern int copy_assignment_arg_p		PARAMS
*** 3930,3937 ****
  extern void cplus_decl_attributes		PARAMS ((tree, tree, tree));
  extern tree constructor_name_full		PARAMS ((tree));
  extern tree constructor_name			PARAMS ((tree));
! extern void setup_vtbl_ptr			PARAMS ((tree, tree));
! extern void defer_fn		PARAMS ((tree));
  extern tree get_temp_name			PARAMS ((tree));
  extern void finish_anon_union			PARAMS ((tree));
  extern tree finish_table			PARAMS ((tree, tree, tree, int));
--- 3930,3936 ----
  extern void cplus_decl_attributes		PARAMS ((tree, tree, tree));
  extern tree constructor_name_full		PARAMS ((tree));
  extern tree constructor_name			PARAMS ((tree));
! extern void defer_fn            		PARAMS ((tree));
  extern tree get_temp_name			PARAMS ((tree));
  extern void finish_anon_union			PARAMS ((tree));
  extern tree finish_table			PARAMS ((tree, tree, tree, int));
*************** extern void prep_stmt                   
*** 4329,4335 ****
  extern void do_pushlevel                        PARAMS ((void));
  extern tree do_poplevel                         PARAMS ((void));
  extern void finish_mem_initializers             PARAMS ((tree));
! 
  extern void clear_out_block                     PARAMS ((void));
  extern tree begin_global_stmt_expr              PARAMS ((void));
  extern tree finish_global_stmt_expr             PARAMS ((tree));
--- 4328,4334 ----
  extern void do_pushlevel                        PARAMS ((void));
  extern tree do_poplevel                         PARAMS ((void));
  extern void finish_mem_initializers             PARAMS ((tree));
! extern void setup_vtbl_ptr			PARAMS ((tree, tree));
  extern void clear_out_block                     PARAMS ((void));
  extern tree begin_global_stmt_expr              PARAMS ((void));
  extern tree finish_global_stmt_expr             PARAMS ((tree));
Index: cp/init.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cp/init.c,v
retrieving revision 1.227
diff -c -3 -p -r1.227 init.c
*** init.c	2001/01/18 14:25:00	1.227
--- init.c	2001/01/19 12:57:50
*************** sort_base_init (t, base_init_list, rbase
*** 698,707 ****
  
     If there is a need for a call to a constructor, we must surround
     that call with a pushlevel/poplevel pair, since we are technically
!    at the PARM level of scope.
! 
!    Note that emit_base_init does *not* initialize virtual base
!    classes.  That is done specially, elsewhere.  */
  
  void
  emit_base_init (mem_init_list, base_init_list)
--- 697,703 ----
  
     If there is a need for a call to a constructor, we must surround
     that call with a pushlevel/poplevel pair, since we are technically
!    at the PARM level of scope.  */
  
  void
  emit_base_init (mem_init_list, base_init_list)
Index: cp/method.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cp/method.c,v
retrieving revision 1.185
diff -c -3 -p -r1.185 method.c
*** method.c	2001/01/10 23:06:28	1.185
--- method.c	2001/01/19 12:57:51
*************** make_thunk (function, delta, vcall_index
*** 2158,2164 ****
        THUNK_VCALL_OFFSET (thunk) = vcall_offset;
        THUNK_GENERATE_WITH_VTABLE_P (thunk) = generate_with_vtable_p;
        /* The thunk itself is not a constructor or destructor, even if
!        the thing it is thunking to is.  */
        DECL_INTERFACE_KNOWN (thunk) = 1;
        DECL_NOT_REALLY_EXTERN (thunk) = 1;
        DECL_SAVED_FUNCTION_DATA (thunk) = NULL;
--- 2158,2164 ----
        THUNK_VCALL_OFFSET (thunk) = vcall_offset;
        THUNK_GENERATE_WITH_VTABLE_P (thunk) = generate_with_vtable_p;
        /* The thunk itself is not a constructor or destructor, even if
!          the thing it is thunking to is.  */
        DECL_INTERFACE_KNOWN (thunk) = 1;
        DECL_NOT_REALLY_EXTERN (thunk) = 1;
        DECL_SAVED_FUNCTION_DATA (thunk) = NULL;

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