typeck.c
203 KB
-
re PR c/23075 (Redundant / bogus warning) · 0c9b182b
PR c/23075 * c-typeck.c (c_finish_return): Set TREE_NO_WARNING on RETURN_EXPR if "return with no value, in function returning non-void" warning has been issued. * tree-cfg.c (execute_warn_function_return): Don't look at RETURN_EXPRs with TREE_NO_WARNING set. * typeck.c (check_return_expr): Add no_warning argument. Set *no_warning to true if "return-statement with no value, in function returning" warning has been issued. * cp-tree.h (check_return_expr): Adjust prototype. * semantics.c (finish_return_stmt): Set TREE_NO_WARNING if check_return_expr set *no_warning to true. * gcc.dg/pr23075.c: New test. * g++.dg/warn/pr23075.C: New test. From-SVN: r103967
Jakub Jelinek committed