From af8579421c955f1d7a2c5e0fcc9c2cfd2d250c16 Mon Sep 17 00:00:00 2001 From: jason Date: Wed, 6 Feb 2002 20:40:18 +0000 Subject: * 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 --- gcc/testsuite/gcc.dg/991214-1.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gcc/testsuite/gcc.dg/991214-1.c') diff --git a/gcc/testsuite/gcc.dg/991214-1.c b/gcc/testsuite/gcc.dg/991214-1.c index 5b9f56c277e..c8e3a04049d 100644 --- a/gcc/testsuite/gcc.dg/991214-1.c +++ b/gcc/testsuite/gcc.dg/991214-1.c @@ -3,8 +3,8 @@ /* Test against a problem with the combiner substituting explicit hard reg references when it shouldn't. */ -int foo (int, int) __attribute__ ((regparm (3))); -int foo (int x, int y) +void foo (int, int) __attribute__ ((regparm (3))); +void foo (int x, int y) { __asm__ __volatile__("" : : "d" (x), "r" (y)); } -- cgit v1.2.1