This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug other/29694] missed warnings about comparisons which are always true/false.
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 3 Nov 2006 10:39:03 -0000
- Subject: [Bug other/29694] missed warnings about comparisons which are always true/false.
- References: <bug-29694-7667@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from pinskia at gcc dot gnu dot org 2006-11-03 10:39 -------
Adding -W/-Wextra and we get a warning:
t.c: In function ?foo?:
t.c:3: warning: comparison of unsigned expression < 0 is always false
t.c:5: warning: comparison of unsigned expression >= 0 is always true
I always forget what -Wextra is for.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29694