# HG changeset patch # User Shinji KONO # Date 1522559145 -32400 # Node ID 2c7bdd5a49f69f4bb1d799983f5ac1da2ae58d9f # Parent c3a50d7877e8a291aae1a9b86faf05c3cbdb968c supress return with no value, in function returning non-void warning on goto code segment in normal function diff -r c3a50d7877e8 -r 2c7bdd5a49f6 gcc/c/c-parser.c --- a/gcc/c/c-parser.c Sat Mar 31 17:18:55 2018 +0900 +++ b/gcc/c/c-parser.c Sun Apr 01 14:05:45 2018 +0900 @@ -5637,7 +5637,13 @@ CbC_IS_CbC_GOTO (expr.value) = 1; CALL_EXPR_TAILCALL (expr.value) = 1; add_stmt(expr.value); + bool warn_return_type_save = warn_return_type; + bool flag_isoc99_save = flag_isoc99; + warn_return_type = false; + flag_isoc99 = false; stmt = c_finish_return(loc, NULL_TREE, NULL_TREE); /* stmt = c_finish_return (0); */ + warn_return_type = warn_return_type_save; + flag_isoc99 = flag_isoc99_save; } else c_parser_error (parser, "expected code segment jump or %<*%>");