[Bug c++/35205] Structure enum wrongly interpreted as a variable in switch case.

2008-02-15 Thread rguenth at gcc dot gnu dot org
--- Comment #2 from rguenth at gcc dot gnu dot org 2008-02-15 09:40 --- Either you want struct s { int i; enum { x } foo; }a; and case a.foo: which is indeed not a integral cosntant expression or you simply want case x: which is what of course works. -- rguenth at gcc dot

[Bug c++/35205] Structure enum wrongly interpreted as a variable in switch case.

2008-02-14 Thread pinskia at gcc dot gnu dot org
--- Comment #1 from pinskia at gcc dot gnu dot org 2008-02-15 00:57 --- I don't think this is a bug, a here is a variable so you are accessing the enum value via the variable which is a constant but not a constant integral expression. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3