public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/23587] Missing "warning: comparison is always false due to limited range of data type"
[not found] <bug-23587-629@http.gcc.gnu.org/bugzilla/>
@ 2005-10-25 20:23 ` pinskia at gcc dot gnu dot org
2005-10-25 20:24 ` [Bug c/23587] " pinskia at gcc dot gnu dot org
` (3 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-10-25 20:23 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pinskia at gcc dot gnu dot org 2005-10-25 20:23 -------
We do have an inconstaincy here, with -W, I get a warning for all 6 of them.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Component|c |c++
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2005-10-25 20:23:21
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23587
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c/23587] Missing "warning: comparison is always false due to limited range of data type"
[not found] <bug-23587-629@http.gcc.gnu.org/bugzilla/>
2005-10-25 20:23 ` [Bug c++/23587] Missing "warning: comparison is always false due to limited range of data type" pinskia at gcc dot gnu dot org
@ 2005-10-25 20:24 ` pinskia at gcc dot gnu dot org
2007-01-23 20:15 ` pluto at agmk dot net
` (2 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-10-25 20:24 UTC (permalink / raw)
To: gcc-bugs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 724 bytes --]
------- Comment #2 from pinskia at gcc dot gnu dot org 2005-10-25 20:24 -------
t.c: In function void c(unsigned int):
t.c:17: warning: comparison of unsigned expression < 0 is always false
t.c: In function void d(long unsigned int):
t.c:23: warning: comparison of unsigned expression < 0 is always false
t.c: In function void e(long long unsigned int):
t.c:29: warning: comparison of unsigned expression < 0 is always false
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|c++ |c
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23587
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c/23587] Missing "warning: comparison is always false due to limited range of data type"
[not found] <bug-23587-629@http.gcc.gnu.org/bugzilla/>
2005-10-25 20:23 ` [Bug c++/23587] Missing "warning: comparison is always false due to limited range of data type" pinskia at gcc dot gnu dot org
2005-10-25 20:24 ` [Bug c/23587] " pinskia at gcc dot gnu dot org
@ 2007-01-23 20:15 ` pluto at agmk dot net
2007-05-20 20:34 ` manu at gcc dot gnu dot org
2007-05-20 20:43 ` manu at gcc dot gnu dot org
4 siblings, 0 replies; 7+ messages in thread
From: pluto at agmk dot net @ 2007-01-23 20:15 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from pluto at agmk dot net 2007-01-23 20:15 -------
*** Bug 29694 has been marked as a duplicate of this bug. ***
--
pluto at agmk dot net changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |pluto at agmk dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23587
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c/23587] Missing "warning: comparison is always false due to limited range of data type"
[not found] <bug-23587-629@http.gcc.gnu.org/bugzilla/>
` (2 preceding siblings ...)
2007-01-23 20:15 ` pluto at agmk dot net
@ 2007-05-20 20:34 ` manu at gcc dot gnu dot org
2007-05-20 20:43 ` manu at gcc dot gnu dot org
4 siblings, 0 replies; 7+ messages in thread
From: manu at gcc dot gnu dot org @ 2007-05-20 20:34 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from manu at gcc dot gnu dot org 2007-05-20 21:31 -------
Subject: Bug 23587
Author: manu
Date: Sun May 20 20:29:55 2007
New Revision: 124875
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=124875
Log:
2007-05-20 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
PR middle-end/7651
PR c++/11856
PR c/12963
PR c/23587
PR other/29694
* c.opt (Wtype-limits): New.
* doc/invoke.texi (Wtype-limits): Document it.
(Wextra): Enabled by -Wextra.
* c-opts.c (c_common_post_options): Enabled by -Wextra.
* c-common.c (shorten_compare): Warn with Wtype-limits.
testsuite/
* gcc.dg/compare6.c: Replace Wall with Wtype-limits.
* gcc.dg/Wtype-limits.c: New.
* gcc.dg/Wtype-limits-Wextra.c: New.
* gcc.dg/Wtype-limits-no.c: New.
* g++.dg/warn/Wtype-limits.C: New.
* g++.dg/warn/Wtype-limits-Wextra.C: New.
* g++.dg/warn/Wtype-limits-no.C: New.
Added:
trunk/gcc/testsuite/g++.dg/warn/Wtype-limits-Wextra.C
trunk/gcc/testsuite/g++.dg/warn/Wtype-limits-no.C
trunk/gcc/testsuite/g++.dg/warn/Wtype-limits.C
trunk/gcc/testsuite/gcc.dg/Wtype-limits-Wextra.c
trunk/gcc/testsuite/gcc.dg/Wtype-limits-no.c
trunk/gcc/testsuite/gcc.dg/Wtype-limits.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/c-common.c
trunk/gcc/c-opts.c
trunk/gcc/c.opt
trunk/gcc/doc/invoke.texi
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gcc.dg/compare6.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23587
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c/23587] Missing "warning: comparison is always false due to limited range of data type"
[not found] <bug-23587-629@http.gcc.gnu.org/bugzilla/>
` (3 preceding siblings ...)
2007-05-20 20:34 ` manu at gcc dot gnu dot org
@ 2007-05-20 20:43 ` manu at gcc dot gnu dot org
4 siblings, 0 replies; 7+ messages in thread
From: manu at gcc dot gnu dot org @ 2007-05-20 20:43 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from manu at gcc dot gnu dot org 2007-05-20 21:42 -------
Fixed for GCC 4.3 (all warnings have been grouped under -Wtype-limits).
--
manu at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.3.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23587
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c/23587] Missing "warning: comparison is always false due to limited range of data type"
2005-08-27 0:15 [Bug c++/23587] New: " v dot haisman at sh dot cvut dot cz
2005-08-27 0:22 ` [Bug c/23587] " pinskia at gcc dot gnu dot org
@ 2005-08-27 2:29 ` pinskia at gcc dot gnu dot org
1 sibling, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-08-27 2:29 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Known to fail| |2.95.3 3.2.3 3.4.0 4.0.0
| |4.1.0
Known to work|2.95.3 3.2.3 3.4.0 4.0.0 |
|4.1.0 |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23587
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c/23587] Missing "warning: comparison is always false due to limited range of data type"
2005-08-27 0:15 [Bug c++/23587] New: " v dot haisman at sh dot cvut dot cz
@ 2005-08-27 0:22 ` pinskia at gcc dot gnu dot org
2005-08-27 2:29 ` pinskia at gcc dot gnu dot org
1 sibling, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-08-27 0:22 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Component|c++ |c
Keywords| |diagnostic
Known to work| |2.95.3 3.2.3 3.4.0 4.0.0
| |4.1.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23587
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2007-05-20 20:43 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-23587-629@http.gcc.gnu.org/bugzilla/>
2005-10-25 20:23 ` [Bug c++/23587] Missing "warning: comparison is always false due to limited range of data type" pinskia at gcc dot gnu dot org
2005-10-25 20:24 ` [Bug c/23587] " pinskia at gcc dot gnu dot org
2007-01-23 20:15 ` pluto at agmk dot net
2007-05-20 20:34 ` manu at gcc dot gnu dot org
2007-05-20 20:43 ` manu at gcc dot gnu dot org
2005-08-27 0:15 [Bug c++/23587] New: " v dot haisman at sh dot cvut dot cz
2005-08-27 0:22 ` [Bug c/23587] " pinskia at gcc dot gnu dot org
2005-08-27 2:29 ` 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).