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

2005-09-06 Thread cvs-commit at gcc dot gnu dot org

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

CVSROOT:/cvs/gcc
Module name:gcc
Changes by: [EMAIL PROTECTED]   2005-09-06 20:07:13

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=gccr1=2.9906r2=2.9907
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/c-typeck.c.diff?cvsroot=gccr1=1.478r2=1.479
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-cfg.c.diff?cvsroot=gccr1=2.218r2=2.219
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gccr1=1.4875r2=1.4876
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/cp-tree.h.diff?cvsroot=gccr1=1.1162r2=1.1163
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/semantics.c.diff?cvsroot=gccr1=1.486r2=1.487
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/typeck.c.diff?cvsroot=gccr1=1.651r2=1.652
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gccr1=1.6020r2=1.6021
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/warn/pr23075.C.diff?cvsroot=gccr1=NONEr2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/pr23075.c.diff?cvsroot=gccr1=NONEr2=1.1



-- 


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


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

2005-09-06 Thread cvs-commit at gcc dot gnu dot org

--- 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: [EMAIL PROTECTED]   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=gcconly_with_tag=gcc-4_0-branchr1=2.7592.2.415r2=2.7592.2.416
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/c-typeck.c.diff?cvsroot=gcconly_with_tag=gcc-4_0-branchr1=1.419.2.12r2=1.419.2.13
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-cfg.c.diff?cvsroot=gcconly_with_tag=gcc-4_0-branchr1=2.151.2.3r2=2.151.2.4
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcconly_with_tag=gcc-4_0-branchr1=1.4648.2.94r2=1.4648.2.95
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/cp-tree.h.diff?cvsroot=gcconly_with_tag=gcc-4_0-branchr1=1.1106.2.14r2=1.1106.2.15
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/semantics.c.diff?cvsroot=gcconly_with_tag=gcc-4_0-branchr1=1.463.2.8r2=1.463.2.9
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/typeck.c.diff?cvsroot=gcconly_with_tag=gcc-4_0-branchr1=1.616.2.17r2=1.616.2.18
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcconly_with_tag=gcc-4_0-branchr1=1.5084.2.386r2=1.5084.2.387
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/warn/pr23075.C.diff?cvsroot=gcconly_with_tag=gcc-4_0-branchr1=NONEr2=1.1.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/pr23075.c.diff?cvsroot=gcconly_with_tag=gcc-4_0-branchr1=NONEr2=1.1.2.1



-- 


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


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

2005-09-06 Thread pinskia at gcc dot gnu dot org

--- Additional Comments From pinskia at gcc dot gnu dot org  2005-09-06 
20:14 ---
Fixed.

-- 
   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


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


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

2005-09-05 Thread jakub at gcc dot gnu dot org


-- 
   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |jakub at gcc dot gnu dot org
   |dot org |
URL||http://gcc.gnu.org/ml/gcc-
   ||patches/2005-
   ||09/msg00265.html
 Status|NEW |ASSIGNED
   Last reconfirmed|2005-07-26 13:11:36 |2005-09-05 09:57:17
   date||


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


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

2005-07-26 Thread pinskia at gcc dot gnu dot org

--- Additional Comments From pinskia at gcc dot gnu dot org  2005-07-26 
13:11 ---
Confirmed, one warning comes from the front-end and the other bogus warning 
comes from the 
middle-end.  I have not looked to see if we set TREE_NO_WARNING on the return 
and if the middle-end 
looks at that flag but I think that might be a way around the issue.

-- 
   What|Removed |Added

 Status|UNCONFIRMED |NEW
 Ever Confirmed||1
   Keywords||diagnostic
   Last reconfirmed|-00-00 00:00:00 |2005-07-26 13:11:36
   date||
Summary|Redundant / bogus warning   |[4.0/4.1 Regression]
   ||Redundant / bogus warning
   Target Milestone|--- |4.0.2


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