aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-cfg.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-cfg.c')
-rw-r--r--gcc/tree-cfg.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c
index 05c69b8..69780c7 100644
--- a/gcc/tree-cfg.c
+++ b/gcc/tree-cfg.c
@@ -1422,7 +1422,7 @@ remove_useless_stmts_warn_notreached (tree stmt)
location_t loc = EXPR_LOCATION (stmt);
if (LOCATION_LINE (loc) > 0)
{
- warning (0, "%Hwill never be executed", &loc);
+ warning (OPT_Wunreachable_code, "%Hwill never be executed", &loc);
return true;
}
}
@@ -6957,12 +6957,12 @@ execute_warn_function_return (void)
location = EXPR_LOCATION (last);
if (location == UNKNOWN_LOCATION)
location = cfun->function_end_locus;
- warning (0, "%Hcontrol reaches end of non-void function", &location);
+ warning (OPT_Wreturn_type, "%Hcontrol reaches end of non-void function", &location);
#else
locus = EXPR_LOCUS (last);
if (!locus)
locus = &cfun->function_end_locus;
- warning (0, "%Hcontrol reaches end of non-void function", locus);
+ warning (OPT_Wreturn_type, "%Hcontrol reaches end of non-void function", locus);
#endif
TREE_NO_WARNING (cfun->decl) = 1;
break;