summaryrefslogtreecommitdiff
path: root/gcc/cp/semantics.c
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2000-10-06 06:00:59 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2000-10-06 06:00:59 +0000
commit810ba5145dda3dbbf478746bd0167595b00ce903 (patch)
tree8f32775fcd5a134d543abc8bcbaccdf83de171d9 /gcc/cp/semantics.c
parenta45cd6615b716d93505f0290408e17d5e2c82490 (diff)
downloadgcc-810ba5145dda3dbbf478746bd0167595b00ce903.tar.gz
* semantics.c (genrtl_finish_function): Don't init or check
can_reach_end; remove noreturn and return value checks. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@36749 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/semantics.c')
-rw-r--r--gcc/cp/semantics.c29
1 files changed, 0 insertions, 29 deletions
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c
index 5c5756775e8..e3d1dec952d 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)