This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/42576] GCC miscompiles switch statement (omits case label/block)
- From: "kgardas at objectsecurity dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 1 Jan 2010 20:34:59 -0000
- Subject: [Bug c++/42576] GCC miscompiles switch statement (omits case label/block)
- References: <bug-42576-6105@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #5 from kgardas at objectsecurity dot com 2010-01-01 20:34 -------
yes, tckind is enum. Thanks for pointing out that this is MICO code issue. If
you also could be so kind and cite some C++/C language specification point
which GCC follows here and which all older GCC releases "overlooked" (or does
not implement support for) as does Sun's C++ and Intel C++ that would be great.
I find somehow silly that while using GCC 4.4.x (1) I'm able to assign
arbitrary value to enum type variable w/o any warning, (2) I'm able to use
arbitrary int for comparison with enum and (3) if I set enum variable value to
arbitrary integer I'm able to use this arbitrary integer in `if/else'
comparison successfully so the assignment nor comparison is not truncated to
enum value IMHO, yet still it does omit my arbitrary integer from switch/case.
Isn't this kind of strange? Thanks!
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42576