[Bug c/35207] gcc does not warn when wrong value is passed to enumerated data type

2008-02-15 Thread manu at gcc dot gnu dot org
--- Comment #2 from manu at gcc dot gnu dot org 2008-02-15 10:24 --- *** This bug has been marked as a duplicate of 7654 *** -- manu at gcc dot gnu dot org changed: What|Removed |Added -

[Bug c/35207] gcc does not warn when wrong value is passed to enumerated data type

2008-02-15 Thread rguenth at gcc dot gnu dot org
--- 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