diff options
author | Paolo Bonzini <bonzini@gnu.org> | 2004-07-12 06:56:45 +0000 |
---|---|---|
committer | Paolo Bonzini <bonzini@gcc.gnu.org> | 2004-07-12 06:56:45 +0000 |
commit | 55e99d5226d32dc4e78fa96375034dda4fbbfcb9 (patch) | |
tree | 19d07d9c11c2ef1cda39ada85ec07837657c0f2f /gcc/cp | |
parent | 2a9dc91764a82c30cae2a12752276e894d80aee6 (diff) | |
download | gcc-55e99d5226d32dc4e78fa96375034dda4fbbfcb9.zip gcc-55e99d5226d32dc4e78fa96375034dda4fbbfcb9.tar.gz gcc-55e99d5226d32dc4e78fa96375034dda4fbbfcb9.tar.bz2 |
re PR tree-optimization/14107 (Return warnings don't work without optimizations enabled)
gcc/ChangeLog:
2004-06-29 Paolo Bonzini <bonzini@gnu.org>
PR tree-optimization/14107
* gimplify.c (gimplify_return_expr): Accept a
RETURN_EXPR with an error argument.
* tree-optimize.c (init_tree_optimization_passes):
Run pass_warn_function_return at -O0.
gcc/cp/ChangeLog:
2004-06-29 Paolo Bonzini <bonzini@gnu.org>
PR tree-optimization/14107
* decl.c (finish_function): Remove temporary band-aid.
From-SVN: r84550
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cp/decl.c | 5 |
2 files changed, 6 insertions, 4 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index e8cef5f..099b1bb 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2004-07-12 Paolo Bonzini <bonzini@gnu.org> + + PR tree-optimization/14107 + * decl.c (finish_function): Remove temporary band-aid. + 2004-07-11 Mark Mitchell <mark@codesourcery.com> * call.c (build_operator_new_call): Avoid using push_to_top_level. diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 6f701ca..ab5dd84 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -10348,13 +10348,10 @@ finish_function (int flags) && !current_function_returns_value && !current_function_returns_null /* Don't complain if we abort or throw. */ && !current_function_returns_abnormally - && !DECL_NAME (DECL_RESULT (fndecl))) -#if 0 - /* Enable this for all functions until bug 14107 is fixed properly. */ + && !DECL_NAME (DECL_RESULT (fndecl)) /* Normally, with -Wreturn-type, flow will complain. Unless we're an inline function, as we might never be compiled separately. */ && (DECL_INLINE (fndecl) || processing_template_decl)) -#endif warning ("no return statement in function returning non-void"); /* Store the end of the function, so that we get good line number |