[llvm-commits] [128618] Fix some problems handling function pointers where the default
clattner at apple.com
clattner at apple.com
Tue Jun 19 13:17:40 PDT 2007
Revision: 128618
Author: clattner
Date: 2007-06-19 13:17:40 -0700 (Tue, 19 Jun 2007)
Log Message:
-----------
Fix some problems handling function pointers where the default
unary conversions were not applied. Many thanks to
Fariborz Jahanian for writing this patch.
Modified Paths:
--------------
apple-local/branches/llvm/gcc/objc/objc-act.c
Modified: apple-local/branches/llvm/gcc/objc/objc-act.c
===================================================================
--- apple-local/branches/llvm/gcc/objc/objc-act.c 2007-06-19 18:43:11 UTC (rev 128617)
+++ apple-local/branches/llvm/gcc/objc/objc-act.c 2007-06-19 20:17:40 UTC (rev 128618)
@@ -1855,8 +1855,10 @@
/* To allow for correct property assignment semantics
and in accordance with C99 rules we generate: type temp;
(temp = rhs, [lhs Setter:temp], temp) */
- temp = objc_create_named_tmp_var (
- objc_decay_parm_type (TREE_TYPE (rhs)), "prop");
+ /* APPLE LOCAL begin radar 5279122 */
+ rhs = default_conversion(rhs);
+ temp = objc_create_named_tmp_var (TREE_TYPE (rhs), "prop");
+ /* APPLE LOCAL end radar 5279122 */
bind = build (BIND_EXPR, void_type_node, temp, NULL, NULL);
TREE_SIDE_EFFECTS (bind) = 1;
add_stmt (bind);
@@ -1867,6 +1869,8 @@
else
{
comma_exp = objc_setter_func_call (receiver, prop_ident, rhs);
+ /* APPLE LOCAL radar 5279122 */
+ rhs = default_conversion(rhs);
/* APPLE LOCAL 5140757 */
temp = save_expr (rhs);
if (TREE_CODE (temp) == VAR_DECL || TREE_CODE (temp) == PARM_DECL)
More information about the llvm-commits
mailing list