Mercurial > hg > CbC > CbC_gcc
diff gcc/c-parser.c @ 61:60c1b2f8487a
remove expand_cbc_goto, and added warnig process.
author | ryoma <e075725@ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 25 Apr 2010 17:03:45 +0900 |
parents | 5b5b9ea5b220 |
children | 1b10fe6932e1 |
line wrap: on
line diff
--- a/gcc/c-parser.c Mon Feb 15 17:39:45 2010 +0900 +++ b/gcc/c-parser.c Sun Apr 25 17:03:45 2010 +0900 @@ -3881,6 +3881,7 @@ static void c_parser_statement_after_labels (c_parser *parser) { + struct c_expr expr; location_t loc = c_parser_peek_token (parser)->location; tree stmt = NULL_TREE; bool in_if_block = parser->in_if_block; @@ -3931,29 +3932,28 @@ else #ifndef noCbC { - struct c_expr expr; if (c_parser_next_token_is (parser, CPP_NAME)) - { - tree id = c_parser_peek_token (parser)->value; - location_t loc = c_parser_peek_token (parser)->location; - /** build_external_ref (id,RID_CbC_CODE , loc); **/ - build_external_ref (loc, id, RID_CbC_CODE, &expr.original_type); - } + { + tree id = c_parser_peek_token (parser)->value; + location_t loc = c_parser_peek_token (parser)->location; + /** build_external_ref (id,RID_CbC_CODE , loc); **/ + build_external_ref (loc, id, RID_CbC_CODE, &expr.original_type); + } expr = c_parser_expr_no_commas (parser, NULL); if (TREE_CODE(expr.value) == CALL_EXPR ) - { - location_t loc = c_parser_peek_token (parser)->location; - cbc_replace_arguments (loc, expr.value); - - TREE_TYPE(expr.value) = void_type_node; - /*tree env = NULL_TREE;**/ - CbC_IS_CbC_GOTO (expr.value) = 1; - CALL_EXPR_TAILCALL (expr.value) = 1; - add_stmt(expr.value); - stmt = c_finish_return(loc, NULL_TREE, NULL_TREE); /* stmt = c_finish_return (0); */ - } + { + location_t loc = c_parser_peek_token (parser)->location; + cbc_replace_arguments (loc, expr.value); + + TREE_TYPE(expr.value) = void_type_node; + /*tree env = NULL_TREE;**/ + CbC_IS_CbC_GOTO (expr.value) = 1; + CALL_EXPR_TAILCALL (expr.value) = 1; + add_stmt(expr.value); + stmt = c_finish_return(loc, NULL_TREE, NULL_TREE); /* stmt = c_finish_return (0); */ + } else - c_parser_error (parser, "expected code segment jump or %<*%>"); + c_parser_error (parser, "expected code segment jump or %<*%>"); } #else c_parser_error (parser, "expected identifier or %<*%>"); @@ -5656,12 +5656,12 @@ break; } { - tree id = c_parser_peek_token (parser)->value; - c_parser_consume_token (parser); - expr.value = build_external_ref (loc, id, - (c_parser_peek_token (parser)->type - == CPP_OPEN_PAREN), - &expr.original_type); + tree id = c_parser_peek_token (parser)->value; + c_parser_consume_token (parser); + expr.value = build_external_ref (loc, id, + (c_parser_peek_token (parser)->type + == CPP_OPEN_PAREN), + &expr.original_type); } break; case CPP_OPEN_PAREN: