[Bug c++/42576] GCC miscompiles switch statement (omits case label/block)
kgardas at objectsecurity dot com
gcc-bugzilla@gcc.gnu.org
Fri Jan 1 20:35:00 GMT 2010
------- 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
More information about the Gcc-bugs
mailing list