This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Use void_type_node, not NULL_TREE for type in COND_EXPR
- From: Richard Guenther <rguenth at tat dot physik dot uni-tuebingen dot de>
- To: gcc-patches at gcc dot gnu dot org
- Date: Fri, 03 Jun 2005 17:36:02 +0200
- Subject: [PATCH] Use void_type_node, not NULL_TREE for type in COND_EXPR
As everyone else does and as specified in tree.def.
Will commit as obvious.
Richard.
2005-06-03 Richard Guenther <rguenth@gcc.gnu.org>
* c-typeck.c (c_finish_if_stmt): Use void_type_node as type
for COND_EXPR.
Index: c-typeck.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/c-typeck.c,v
retrieving revision 1.447
diff -c -3 -p -r1.447 c-typeck.c
*** c-typeck.c 2 Jun 2005 20:08:56 -0000 1.447
--- c-typeck.c 3 Jun 2005 15:33:10 -0000
*************** c_finish_if_stmt (location_t if_locus, t
*** 6923,6929 ****
}
}
! stmt = build3 (COND_EXPR, NULL_TREE, cond, then_block, else_block);
SET_EXPR_LOCATION (stmt, if_locus);
add_stmt (stmt);
}
--- 6923,6929 ----
}
}
! stmt = build3 (COND_EXPR, void_type_node, cond, then_block, else_block);
SET_EXPR_LOCATION (stmt, if_locus);
add_stmt (stmt);
}