This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[C++ PATCH]: Tidy some code
- From: Nathan Sidwell <nathan at codesourcery dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Tue, 26 Nov 2002 17:40:52 +0000
- Subject: [C++ PATCH]: Tidy some code
Hi,
I've installed this obvious patch which adds some missing
documentation and tidies up a couple of things.
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
2002-11-26 Nathan Sidwell <nathan@codesourcery.com>
* cp-tree.h (DECL_LANG_FLAG_4): Document more uses.
(template_parms_equal): Remove prototype.
* typeck.c (buuld_indirect_ref): Reformat.
Index: cp/cp-tree.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/cp-tree.h,v
retrieving revision 1.770
diff -c -3 -p -r1.770 cp-tree.h
*** cp/cp-tree.h 9 Nov 2002 11:53:15 -0000 1.770
--- cp/cp-tree.h 26 Nov 2002 15:17:51 -0000
*************** struct diagnostic_context;
*** 101,106 ****
--- 101,107 ----
DECL_IMPLICIT_TYPEDEF_P (in a TYPE_DECL)
3: DECL_IN_AGGR_P.
4: DECL_C_BIT_FIELD (in a FIELD_DECL)
+ DECL_MAYBE_TEMPLATE (in a FUNCTION_DECL)
5: DECL_INTERFACE_KNOWN.
6: DECL_THIS_STATIC (in VAR_DECL or FUNCTION_DECL).
7: DECL_DEAD_FOR_LOCAL (in VAR_DECL).
*************** extern int push_tinst_level PARAMS ((t
*** 4001,4007 ****
extern void pop_tinst_level PARAMS ((void));
extern int more_specialized_class PARAMS ((tree, tree));
extern int is_member_template PARAMS ((tree));
- extern int template_parms_equal PARAMS ((tree, tree));
extern int comp_template_parms PARAMS ((tree, tree));
extern int template_class_depth PARAMS ((tree));
extern int is_specialization_of PARAMS ((tree, tree));
--- 4002,4007 ----
Index: cp/typeck.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/typeck.c,v
retrieving revision 1.433
diff -c -3 -p -r1.433 typeck.c
*** cp/typeck.c 21 Nov 2002 21:42:40 -0000 1.433
--- cp/typeck.c 26 Nov 2002 15:18:05 -0000
*************** build_indirect_ref (ptr, errorstring)
*** 2327,2334 ****
return error_mark_node;
}
else if (TREE_CODE (pointer) == ADDR_EXPR
! && !flag_volatile
! && same_type_p (t, TREE_TYPE (TREE_OPERAND (pointer, 0))))
/* The POINTER was something like `&x'. We simplify `*&x' to
`x'. */
return TREE_OPERAND (pointer, 0);
--- 2327,2334 ----
return error_mark_node;
}
else if (TREE_CODE (pointer) == ADDR_EXPR
! && !flag_volatile
! && same_type_p (t, TREE_TYPE (TREE_OPERAND (pointer, 0))))
/* The POINTER was something like `&x'. We simplify `*&x' to
`x'. */
return TREE_OPERAND (pointer, 0);