[PATCH]: cleanup for conversion exprs (2/4)
Tomas Bily
tomby@atrey.karlin.mff.cuni.cz
Wed May 7 14:18:00 GMT 2008
Hi,
this series of patches is doing small cleanup in using conversion
expressions (CONVERT_EXPR, NOP_EXPR). Expression patterns described
below are replaced by new macro. This is intermediate patch for next
series of patches that merges differences between CONVERT_EXPR/NOP_EXPR
and removes NOP_EXPR.
(TREE_CODE (EXP) == NOP_EXPR || TREE_CODE (EXP) == CONVERT_EXPR)
-> CONVERT_EXPR_P(EXP)
case NOP_EXPR: case CONVERT_EXPR
-> CASE_CONVERT
-> means replaced by
Bootstraped and tested on x86_64-linux, i686-linux, ppc-linux, ia64-linux.
Ok?
Greetings
Tomas
Patch 2
Changelog:
2008-05-07 Tomas Bily <tbily@suse.cz>
* objc-act.c (objc_generate_write_barrier, objc_finish_message_expr):
Use CONVERT_EXPR_P.
Index: gcc/objc/objc-act.c
===================================================================
--- gcc/objc/objc-act.c (revision 134751)
+++ gcc/objc/objc-act.c (working copy)
@@ -3164,8 +3164,7 @@ objc_generate_write_barrier (tree lhs, e
outer = TREE_OPERAND (lhs, 0);
while (!strong_cast_p
- && (TREE_CODE (outer) == CONVERT_EXPR
- || TREE_CODE (outer) == NOP_EXPR
+ && (CONVERT_EXPR_P (outer)
|| TREE_CODE (outer) == NON_LVALUE_EXPR))
{
tree lhstype = TREE_TYPE (outer);
@@ -6267,8 +6266,7 @@ objc_finish_message_expr (tree receiver,
rtype = receiver;
while (TREE_CODE (rtype) == COMPOUND_EXPR
|| TREE_CODE (rtype) == MODIFY_EXPR
- || TREE_CODE (rtype) == NOP_EXPR
- || TREE_CODE (rtype) == CONVERT_EXPR
+ || CONVERT_EXPR_P (rtype)
|| TREE_CODE (rtype) == COMPONENT_REF)
rtype = TREE_OPERAND (rtype, 0);
self = (rtype == self_decl);
More information about the Gcc-patches
mailing list