This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/23075] [4.0/4.1 Regression] Redundant / bogus warning


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-09-06 20:11 -------
Subject: Bug 23075

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-4_0-branch
Changes by:	jakub@gcc.gnu.org	2005-09-06 20:11:09

Modified files:
	gcc            : ChangeLog c-typeck.c tree-cfg.c 
	gcc/cp         : ChangeLog cp-tree.h semantics.c typeck.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/g++.dg/warn: pr23075.C 
	gcc/testsuite/gcc.dg: pr23075.c 

Log message:
	PR c/23075
	* c-typeck.c (c_finish_return): Set TREE_NO_WARNING on RETURN_EXPR
	if "return with no value, in function returning non-void" warning
	has been issued.
	* tree-cfg.c (execute_warn_function_return): Don't look at
	RETURN_EXPRs with TREE_NO_WARNING set.
	
	* typeck.c (check_return_expr): Add no_warning argument.  Set
	*no_warning to true if "return-statement with no value, in function
	returning" warning has been issued.
	* cp-tree.h (check_return_expr): Adjust prototype.
	* semantics.c (finish_return_stmt): Set TREE_NO_WARNING if
	check_return_expr set *no_warning to true.
	
	* gcc.dg/pr23075.c: New test.
	* g++.dg/warn/pr23075.C: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=2.7592.2.415&r2=2.7592.2.416
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/c-typeck.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.419.2.12&r2=1.419.2.13
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-cfg.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=2.151.2.3&r2=2.151.2.4
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.4648.2.94&r2=1.4648.2.95
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/cp-tree.h.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.1106.2.14&r2=1.1106.2.15
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/semantics.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.463.2.8&r2=1.463.2.9
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/typeck.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.616.2.17&r2=1.616.2.18
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.5084.2.386&r2=1.5084.2.387
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/warn/pr23075.C.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=NONE&r2=1.1.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/pr23075.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=NONE&r2=1.1.2.1



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23075


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]