diff options
Diffstat (limited to 'gcc/tree-cfg.c')
-rw-r--r-- | gcc/tree-cfg.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c index f433efc..7196614 100644 --- a/gcc/tree-cfg.c +++ b/gcc/tree-cfg.c @@ -9329,9 +9329,9 @@ pass_warn_function_return::execute (function *fun) location = gimple_location (last); if (LOCATION_LOCUS (location) == UNKNOWN_LOCATION) location = fun->function_end_locus; - warning_at (location, OPT_Wreturn_type, - "control reaches end of non-void function"); - TREE_NO_WARNING (fun->decl) = 1; + if (warning_at (location, OPT_Wreturn_type, + "control reaches end of non-void function")) + TREE_NO_WARNING (fun->decl) = 1; break; } } @@ -9361,9 +9361,9 @@ pass_warn_function_return::execute (function *fun) location = gimple_location (prev); if (LOCATION_LOCUS (location) == UNKNOWN_LOCATION) location = fun->function_end_locus; - warning_at (location, OPT_Wreturn_type, - "control reaches end of non-void function"); - TREE_NO_WARNING (fun->decl) = 1; + if (warning_at (location, OPT_Wreturn_type, + "control reaches end of non-void function")) + TREE_NO_WARNING (fun->decl) = 1; break; } } |