diff options
author | Richard Henderson <rth@cygnus.com> | 2000-10-05 23:00:59 -0700 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2000-10-05 23:00:59 -0700 |
commit | 63c16fc50c5cf446269da98919ccc7016bd4498f (patch) | |
tree | 8f32775fcd5a134d543abc8bcbaccdf83de171d9 /gcc | |
parent | 9cc37c9f65a2fb17982afa839ba7e636d720d421 (diff) | |
download | gcc-63c16fc50c5cf446269da98919ccc7016bd4498f.zip gcc-63c16fc50c5cf446269da98919ccc7016bd4498f.tar.gz gcc-63c16fc50c5cf446269da98919ccc7016bd4498f.tar.bz2 |
semantics.c (genrtl_finish_function): Don't init or check can_reach_end; remove noreturn and return value checks.
* semantics.c (genrtl_finish_function): Don't init or check
can_reach_end; remove noreturn and return value checks.
From-SVN: r36749
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/cp/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cp/semantics.c | 29 |
2 files changed, 5 insertions, 29 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 23e16de..cea08bd 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2000-10-05 Richard Henderson <rth@cygnus.com> + + * semantics.c (genrtl_finish_function): Don't init or check + can_reach_end; remove noreturn and return value checks. + 2000-10-05 Tom Tromey <tromey@cygnus.com> * init.c (build_java_class_ref): Use `build_static_name' with a diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c index 5c57567..e3d1dec 100644 --- a/gcc/cp/semantics.c +++ b/gcc/cp/semantics.c @@ -2528,8 +2528,6 @@ static void genrtl_finish_function (fn) tree fn; { - int returns_null; - int returns_value; tree no_return_label = NULL_TREE; #if 0 @@ -2630,14 +2628,6 @@ genrtl_finish_function (fn) /* Generate rtl for function exit. */ expand_function_end (input_filename, lineno, 1); - /* So we can tell if jump_optimize sets it to 1. */ - can_reach_end = 0; - - /* Before we call rest_of_compilation (which will pop the - CURRENT_FUNCTION), we must save these values. */ - returns_null = current_function_returns_null; - returns_value = current_function_returns_value; - /* If this is a nested function (like a template instantiation that we're compiling in the midst of compiling something else), push a new GC context. That will keep local variables on the stack from @@ -2684,25 +2674,6 @@ genrtl_finish_function (fn) if (DECL_STATIC_DESTRUCTOR (fn)) static_dtors = tree_cons (NULL_TREE, fn, static_dtors); - if (DECL_NAME (DECL_RESULT (fn))) - returns_value |= can_reach_end; - else - returns_null |= can_reach_end; - - if (TREE_THIS_VOLATILE (fn) && returns_null) - warning ("`noreturn' function does return"); - else if (returns_null - && TREE_CODE (TREE_TYPE (TREE_TYPE (fn))) != VOID_TYPE) - { - /* Always complain if there's just no return statement. */ - if (!returns_value) - warning ("no return statement in function returning non-void"); - else if (warn_return_type || pedantic) - /* If this function returns non-void and control can drop through, - complain. */ - warning ("control reaches end of non-void function"); - } - --function_depth; if (!DECL_SAVED_INSNS (fn) |