gcc/gcc/testsuite/gcc.dg Wreturn-type.c

jason@gcc.gnu.org jason@gcc.gnu.org
Thu Feb 7 04:22:00 GMT 2002


CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	jason@gcc.gnu.org	2002-02-07 04:22:10

Added files:
	gcc/testsuite/gcc.dg: Wreturn-type.c 

Log message:
	* 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.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/Wreturn-type.c.diff?cvsroot=gcc&r1=NONE&r2=1.1



More information about the Gcc-cvs mailing list