This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/29774] enum int type gets promoted to unsigned int in comparison
- From: "chris dot pickett at mail dot mcgill dot ca" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 9 Nov 2006 04:46:41 -0000
- Subject: [Bug c/29774] enum int type gets promoted to unsigned int in comparison
- References: <bug-29774-8809@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from chris dot pickett at mail dot mcgill dot ca 2006-11-09 04:46 -------
I got confused. It's only the enum constant that must be int. Indeed, if the
comparison is `if (FOO >= 0)', no warning is issued and all is well.
Thanks for the extremely fast response!
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29774