summaryrefslogtreecommitdiff
path: root/gcc/c-objc-common.c
diff options
context:
space:
mode:
authorjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2005-03-23 01:35:06 +0000
committerjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2005-03-23 01:35:06 +0000
commit45a78cc0d27599fccb48470d7f89b113b7fcb446 (patch)
tree2dc0be928c289ceb6e2df4ae5cf04396eb70721e /gcc/c-objc-common.c
parentb96dc1214cf672f219471ff29ee90c6c109393c5 (diff)
downloadgcc-45a78cc0d27599fccb48470d7f89b113b7fcb446.tar.gz
* c-common.c (c_common_truthvalue_conversion): Adjust comment.
Call c_common_truthvalue_conversion rather than lang_hooks.truthvalue_conversion. * c-convert.c (convert): Call c_objc_common_truthvalue_conversion. * c-objc-common.c (c_objc_common_truthvalue_conversion): Move to c-typeck.c. * c-objc-common.h (LANG_HOOKS_TRUTHVALUE_CONVERSION): Change to c_common_truthvalue_conversion. * c-parser.c (c_parser_paren_condition, c_parser_for_statement, c_parser_conditional_expression, c_parser_binary_expression): Call c_objc_common_truthvalue_conversion. * c-typeck.c (build_unary_op): Call c_objc_common_truthvalue_conversion. (build_conditional_expr): Do not call lang_hooks.truthvalue_conversion. (build_binary_op): Call c_common_truthvalue_conversion. (c_objc_common_truthvalue_conversion): Moved from c-objc-common.c. Call default_function_array_conversion instead of default_conversion. objc: * objc-act.c (next_sjlj_build_enter_and_setjmp, next_sjlj_build_catch_list, next_sjlj_build_try_catch_finally): Call c_common_truthvalue_conversion. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@96917 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-objc-common.c')
-rw-r--r--gcc/c-objc-common.c28
1 files changed, 0 insertions, 28 deletions
diff --git a/gcc/c-objc-common.c b/gcc/c-objc-common.c
index 89fb409878e..4b09c3e40d8 100644
--- a/gcc/c-objc-common.c
+++ b/gcc/c-objc-common.c
@@ -230,34 +230,6 @@ c_tree_printer (pretty_printer *pp, text_info *text)
return true;
}
-tree
-c_objc_common_truthvalue_conversion (tree expr)
-{
- retry:
- switch (TREE_CODE (TREE_TYPE (expr)))
- {
- case ARRAY_TYPE:
- expr = default_conversion (expr);
- if (TREE_CODE (TREE_TYPE (expr)) != ARRAY_TYPE)
- goto retry;
-
- error ("used array that cannot be converted to pointer where scalar is required");
- return error_mark_node;
-
- case RECORD_TYPE:
- error ("used struct type value where scalar is required");
- return error_mark_node;
-
- case UNION_TYPE:
- error ("used union type value where scalar is required");
- return error_mark_node;
- default:
- break;
- }
-
- return c_common_truthvalue_conversion (expr);
-}
-
/* In C and ObjC, all decls have "C" linkage. */
bool
has_c_linkage (tree decl ATTRIBUTE_UNUSED)