From e57e265ba61a2e07623521dc872a2b7e82e70b37 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Tue, 3 Feb 2004 11:22:41 +0000 Subject: re PR c/11658 (Wrong error message) 2004-02-03 Paolo Bonzini PR c/11658 PR c/13994 * Makefile.in (c-parse.o, c-convert.o, c-typeck.o): Depend on langhooks.h. * objc/Make-lang.in (objc-parse.o): Depend on langhooks.h. * c-parse.in, c-convert.c, c-typeck.c, objc/objc-act.c: Include langhooks.h. Replace c_common_truthvalue_conversion with the truthvalue_conversion language hook throughout. (expr_no_commas): Call default_conversion before save_expr for the first term of the production 'x ? : y'. * c-common.c (c_common_truthvalue_conversion): Remove obsolete block. Invoke recursively the hook instead of this function. * c-convert.c (convert): handle ERROR_MARK_NODE. * c-typeck.c (build_binary_op): handle ERROR_MARK_NODE returned by the truthvalue_conversion language hook. * c-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Use c_objc_common_truthvalue_conversion. * c-objc-common.c (c_objc_common_truthvalue_conversion): New function. * c-tree.h (c_objc_common_truthvalue_conversion): Declare it. * objc/objc-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Use c_objc_common_truthvalue_conversion. From-SVN: r77168 --- gcc/c-lang.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc/c-lang.c') diff --git a/gcc/c-lang.c b/gcc/c-lang.c index 1a097e27797..927f5abb210 100644 --- a/gcc/c-lang.c +++ b/gcc/c-lang.c @@ -66,7 +66,7 @@ enum c_language_kind c_language = clk_c; #undef LANG_HOOKS_PARSE_FILE #define LANG_HOOKS_PARSE_FILE c_common_parse_file #undef LANG_HOOKS_TRUTHVALUE_CONVERSION -#define LANG_HOOKS_TRUTHVALUE_CONVERSION c_common_truthvalue_conversion +#define LANG_HOOKS_TRUTHVALUE_CONVERSION c_objc_common_truthvalue_conversion #undef LANG_HOOKS_FINISH_INCOMPLETE_DECL #define LANG_HOOKS_FINISH_INCOMPLETE_DECL c_finish_incomplete_decl #undef LANG_HOOKS_UNSAFE_FOR_REEVAL -- cgit v1.2.1