[Bug c/35207] gcc does not warn when wrong value is passed to enumerated data type
rguenth at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Fri Feb 15 09:44:00 GMT 2008
------- Comment #1 from rguenth at gcc dot gnu dot org 2008-02-15 09:43 -------
We can add a warning to follow C++ which would reject this code. EDG for
example says
t.c(38): warning #188: enumerated type mixed with another type
t.model_color = 5;
but the C std says the enum can hold all values represented by the underlying
type, so the code is behaving as required.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |enhancement
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35207
More information about the Gcc-bugs
mailing list