# HG changeset patch # User Shinji KONO # Date 1247821280 -32400 # Node ID 0b3575e68bacd51d5edca7a4f8fc55f443f59230 # Parent caeb520cebed99a8d6fb7654026e249ef7020f51 c-parser.c fix diff -r caeb520cebed -r 0b3575e68bac gcc/c-parser.c --- a/gcc/c-parser.c Fri Jul 17 17:43:54 2009 +0900 +++ b/gcc/c-parser.c Fri Jul 17 18:01:20 2009 +0900 @@ -471,9 +471,6 @@ #ifndef noCbC case RID_CbC_CODE: #endif -#ifndef noCbC - case RID_CbC_CODE: -#endif return true; default: return false; @@ -3768,8 +3765,8 @@ env_struct = build_c_cast (build_pointer_type(env_struct_type), env.value); //build_component_ref (cbc_env, get_identifier("argsp")); - ebp = build_component_ref (build_indirect_ref (env_struct, "CbCenv->sp"), get_identifier("sp")); - argsp = build_component_ref (build_indirect_ref (env_struct, "CbCenv->sp"), get_identifier("argsp")); + ebp = build_component_ref (build_indirect_ref (loc,env_struct, "CbCenv->sp"), get_identifier("sp")); + argsp = build_component_ref (build_indirect_ref (loc, env_struct, "CbCenv->sp"), get_identifier("argsp")); //ebp = chainon (ebp, argsp); tmp = build_tree_list (ebp, argsp); @@ -5671,23 +5668,23 @@ /* get value of %ebp. */ ebp = build_external_ref ( get_identifier ("__builtin_frame_address"), 0, - c_parser_peek_token (parser)->location); + (loc = c_parser_peek_token (parser)->location)); ebp = build_function_call(ebp, build_tree_list (NULL_TREE, build_int_cst (NULL_TREE,0))); /* assignment void *sp = %ebp */ comp = build_component_ref (cbc_env, get_identifier("sp")); - add_stmt (build_modify_expr (comp, NOP_EXPR, ebp)); + add_stmt (build_modify_expr (loc, comp, NOP_EXPR, ebp)); /* void *argsp = &__environment.retval */ comp = build_component_ref (cbc_env, get_identifier("argsp")); comp0 = build_component_ref (cbc_env, get_identifier("retval")); - comp0 = build_unary_op (ADDR_EXPR, comp0, 0); - add_stmt (build_modify_expr (comp, NOP_EXPR, comp0)); + comp0 = build_unary_op (loc, ADDR_EXPR, comp0, 0); + add_stmt (build_modify_expr (loc, comp, NOP_EXPR, comp0)); /* &__environment for value of stmt_expr. */ - add_stmt (build_unary_op (ADDR_EXPR, cbc_env, 0)); + add_stmt (build_unary_op (loc, ADDR_EXPR, cbc_env, 0)); #endif //expr.value = valuep_tree; TREE_SIDE_EFFECTS (stmt) = 1; @@ -5733,7 +5730,7 @@ cexpr.value = lang_hooks.decls.pushdecl(decl_cond); cexpr.original_code = ERROR_MARK; - cond = c_objc_common_truthvalue_conversion(cexpr.value); + cond = c_objc_common_truthvalue_conversion(loc, cexpr.value); if (EXPR_P (cond)) SET_EXPR_LOCATION (cond, loc);