aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.misc-tests/bprob-1.c
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2002-02-06 15:40:18 -0500
committerJason Merrill <jason@gcc.gnu.org>2002-02-06 15:40:18 -0500
commit5ce89b2ef0de68535d829e3aee23921542d1a0ae (patch)
tree9c61da9c4a64edc8cbc210d2755ecb06d031534b /gcc/testsuite/gcc.misc-tests/bprob-1.c
parentcaaf2272c0eeb365b2c98d60f3ecf8f8f78cdb1f (diff)
downloadgcc-5ce89b2ef0de68535d829e3aee23921542d1a0ae.zip
gcc-5ce89b2ef0de68535d829e3aee23921542d1a0ae.tar.gz
gcc-5ce89b2ef0de68535d829e3aee23921542d1a0ae.tar.bz2
c-decl.c (finish_function): Warn about a non-void function with no return statement and no abnormal exit.
* 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. From-SVN: r49551
Diffstat (limited to 'gcc/testsuite/gcc.misc-tests/bprob-1.c')
-rw-r--r--gcc/testsuite/gcc.misc-tests/bprob-1.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/testsuite/gcc.misc-tests/bprob-1.c b/gcc/testsuite/gcc.misc-tests/bprob-1.c
index 3d6055a..9420250 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);