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]: Fix thinkos


Hi,
I've installed this patch which fixes a thinko in error.c and removes a
now unused local variable in typeck.c

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
2000-12-04  Nathan Sidwell  <nathan@codesourcery.com>

	* error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
	TYPE_POLYMORPHIC_P.
	
	* typeck.c (build_static_cast): Remove unused variable.

Index: cp/error.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cp/error.c,v
retrieving revision 1.142
diff -c -3 -p -r1.142 error.c
*** error.c	2000/11/07 22:49:57	1.142
--- error.c	2000/12/04 16:12:19
*************** dump_function_decl (t, flags)
*** 1219,1225 ****
      /* OK */;
    else if (DECL_STATIC_FUNCTION_P (t))
      print_identifier (scratch_buffer, "static ");
!   else if (TYPE_POLYMORPHIC_P (t))
      print_identifier (scratch_buffer, "virtual ");
  
    /* Print the return type?  */
--- 1219,1225 ----
      /* OK */;
    else if (DECL_STATIC_FUNCTION_P (t))
      print_identifier (scratch_buffer, "static ");
!   else if (DECL_VIRTUAL_P (t))
      print_identifier (scratch_buffer, "virtual ");
  
    /* Print the return type?  */
Index: cp/typeck.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cp/typeck.c,v
retrieving revision 1.323
diff -c -3 -p -r1.323 typeck.c
*** typeck.c	2000/12/01 11:52:32	1.323
--- typeck.c	2000/12/04 16:12:24
*************** tree
*** 5046,5052 ****
  build_static_cast (type, expr)
     tree type, expr;
  {
!   tree intype, binfo;
    int ok;
  
    if (type == error_mark_node || expr == error_mark_node)
--- 5046,5052 ----
  build_static_cast (type, expr)
     tree type, expr;
  {
!   tree intype;
    int ok;
  
    if (type == error_mark_node || expr == error_mark_node)

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