summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.misc-tests
diff options
context:
space:
mode:
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2002-02-06 20:40:18 +0000
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2002-02-06 20:40:18 +0000
commitaf8579421c955f1d7a2c5e0fcc9c2cfd2d250c16 (patch)
tree9c61da9c4a64edc8cbc210d2755ecb06d031534b /gcc/testsuite/gcc.misc-tests
parent0e62d8da8abc63fed2972043163030fd5b27df22 (diff)
downloadgcc-af8579421c955f1d7a2c5e0fcc9c2cfd2d250c16.tar.gz
* c-decl.c (finish_function): Warn about a non-void function with
no return statement and no abnormal exit. (current_function_returns_abnormally): New variable. (start_function): Clear it. (struct c_language_function): Add returns_abnormally. (push_c_function_context): Save it. (pop_c_function_context): Restore it. (builtin_function): Set TREE_THIS_VOLATILE on return fns. (grokdeclarator): Set C_FUNCTION_IMPLICIT_INT on functions without an explicit return type. * c-tree.h: Declare current_function_returns_abnormally. (C_FUNCTION_IMPLICIT_INT): New macro. * c-typeck.c (build_function_call): Set it. (c_expand_return): Set current_function_returns_value even if the value is erroneous. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@49551 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.misc-tests')
-rw-r--r--gcc/testsuite/gcc.misc-tests/bprob-1.c2
-rw-r--r--gcc/testsuite/gcc.misc-tests/gcov-4.c2
-rw-r--r--gcc/testsuite/gcc.misc-tests/gcov-4b.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/gcc/testsuite/gcc.misc-tests/bprob-1.c b/gcc/testsuite/gcc.misc-tests/bprob-1.c
index 3d6055a2f9f..94202504fb5 100644
--- a/gcc/testsuite/gcc.misc-tests/bprob-1.c
+++ b/gcc/testsuite/gcc.misc-tests/bprob-1.c
@@ -68,7 +68,7 @@ test_for2 (int m, int n, int o)
return for_temp; /* count(6) */
}
-int
+void
call_for ()
{
for_val1 += test_for1 (0);
diff --git a/gcc/testsuite/gcc.misc-tests/gcov-4.c b/gcc/testsuite/gcc.misc-tests/gcov-4.c
index d5986fe4b8b..27ef508cfe6 100644
--- a/gcc/testsuite/gcc.misc-tests/gcov-4.c
+++ b/gcc/testsuite/gcc.misc-tests/gcov-4.c
@@ -68,7 +68,7 @@ test_for2 (int m, int n, int o)
return for_temp; /* count(6) */
}
-int
+void
call_for ()
{
for_val1 += test_for1 (0);
diff --git a/gcc/testsuite/gcc.misc-tests/gcov-4b.c b/gcc/testsuite/gcc.misc-tests/gcov-4b.c
index 6bc20e0005a..72870b20952 100644
--- a/gcc/testsuite/gcc.misc-tests/gcov-4b.c
+++ b/gcc/testsuite/gcc.misc-tests/gcov-4b.c
@@ -41,7 +41,7 @@ test_for2 (int m, int n, int o)
return for_temp;
}
-int
+void
call_for ()
{
for_val1 += test_for1 (0);