public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/23075] New: Redundant / bogus warning
@ 2005-07-26 12:14 neil at gcc dot gnu dot org
2005-07-26 12:23 ` [Bug c/23075] " neil at gcc dot gnu dot org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: neil at gcc dot gnu dot org @ 2005-07-26 12:14 UTC (permalink / raw)
To: gcc-bugs
Compiling
int foo (void)
{
return;
}
with -ansi -pedantic gives two warnings; with GCC 3.3 it only gave one. As a
QOI issue 3.3's behaviour is superior - warning about control reaching the end
of the function is a bit odd.
--
Summary: Redundant / bogus warning
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Severity: minor
Priority: P2
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: neil at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23075
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c/23075] Redundant / bogus warning
2005-07-26 12:14 [Bug c/23075] New: Redundant / bogus warning neil at gcc dot gnu dot org
@ 2005-07-26 12:23 ` neil at gcc dot gnu dot org
2005-07-26 13:13 ` [Bug c/23075] [4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: neil at gcc dot gnu dot org @ 2005-07-26 12:23 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From neil at gcc dot gnu dot org 2005-07-26 12:13 -------
I meant to add -Wall to the warning list.
--
What |Removed |Added
----------------------------------------------------------------------------
Summary|Redundant / bogus warning |Redundant / bogus warning
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23075
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c/23075] [4.0/4.1 Regression] Redundant / bogus warning
2005-07-26 12:14 [Bug c/23075] New: Redundant / bogus warning neil at gcc dot gnu dot org
2005-07-26 12:23 ` [Bug c/23075] " neil at gcc dot gnu dot org
@ 2005-07-26 13:13 ` pinskia at gcc dot gnu dot org
2005-09-05 9:57 ` jakub at gcc dot gnu dot org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-07-26 13:13 UTC (permalink / raw)
To: gcc-bugs
------- 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|0000-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
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c/23075] [4.0/4.1 Regression] Redundant / bogus warning
2005-07-26 12:14 [Bug c/23075] New: Redundant / bogus warning neil at gcc dot gnu dot org
2005-07-26 12:23 ` [Bug c/23075] " neil at gcc dot gnu dot org
2005-07-26 13:13 ` [Bug c/23075] [4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
@ 2005-09-05 9:57 ` jakub at gcc dot gnu dot org
2005-09-06 20:07 ` cvs-commit at gcc dot gnu dot org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu dot org @ 2005-09-05 9:57 UTC (permalink / raw)
To: gcc-bugs
--
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c/23075] [4.0/4.1 Regression] Redundant / bogus warning
2005-07-26 12:14 [Bug c/23075] New: Redundant / bogus warning neil at gcc dot gnu dot org
` (2 preceding siblings ...)
2005-09-05 9:57 ` jakub at gcc dot gnu dot org
@ 2005-09-06 20:07 ` cvs-commit at gcc dot gnu dot org
2005-09-06 20:11 ` cvs-commit at gcc dot gnu dot org
2005-09-06 20:14 ` pinskia at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-09-06 20:07 UTC (permalink / raw)
To: gcc-bugs
------- 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: jakub@gcc.gnu.org 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=gcc&r1=2.9906&r2=2.9907
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/c-typeck.c.diff?cvsroot=gcc&r1=1.478&r2=1.479
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-cfg.c.diff?cvsroot=gcc&r1=2.218&r2=2.219
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.4875&r2=1.4876
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/cp-tree.h.diff?cvsroot=gcc&r1=1.1162&r2=1.1163
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/semantics.c.diff?cvsroot=gcc&r1=1.486&r2=1.487
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/typeck.c.diff?cvsroot=gcc&r1=1.651&r2=1.652
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.6020&r2=1.6021
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/warn/pr23075.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/pr23075.c.diff?cvsroot=gcc&r1=NONE&r2=1.1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23075
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c/23075] [4.0/4.1 Regression] Redundant / bogus warning
2005-07-26 12:14 [Bug c/23075] New: Redundant / bogus warning neil at gcc dot gnu dot org
` (3 preceding siblings ...)
2005-09-06 20:07 ` cvs-commit at gcc dot gnu dot org
@ 2005-09-06 20:11 ` cvs-commit at gcc dot gnu dot org
2005-09-06 20:14 ` pinskia at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-09-06 20:11 UTC (permalink / raw)
To: gcc-bugs
------- 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
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c/23075] [4.0/4.1 Regression] Redundant / bogus warning
2005-07-26 12:14 [Bug c/23075] New: Redundant / bogus warning neil at gcc dot gnu dot org
` (4 preceding siblings ...)
2005-09-06 20:11 ` cvs-commit at gcc dot gnu dot org
@ 2005-09-06 20:14 ` pinskia at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-09-06 20:14 UTC (permalink / raw)
To: gcc-bugs
------- 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
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2005-09-06 20:14 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-07-26 12:14 [Bug c/23075] New: Redundant / bogus warning neil at gcc dot gnu dot org
2005-07-26 12:23 ` [Bug c/23075] " neil at gcc dot gnu dot org
2005-07-26 13:13 ` [Bug c/23075] [4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
2005-09-05 9:57 ` jakub at gcc dot gnu dot org
2005-09-06 20:07 ` cvs-commit at gcc dot gnu dot org
2005-09-06 20:11 ` cvs-commit at gcc dot gnu dot org
2005-09-06 20:14 ` pinskia at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).