------- 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=35205