--- p/types.c.orig Sat Feb 26 16:46:31 2005 +++ p/types.c Sun Feb 27 17:21:22 2005 @@ -1195,7 +1195,9 @@ hi = TREE_PURPOSE (c) = fold (hi); } if (!comptypes (TREE_TYPE (lo), selector_type) || (hi && !comptypes (TREE_TYPE (hi), selector_type))) - error ("type mismatch in variant selector constant"); + error ("type mismatch in variant case constant"); + if (TREE_CODE (lo) != INTEGER_CST || (hi && TREE_CODE (hi) != INTEGER_CST)) + error ("variant case constant must be constant"); } vf = chainon (vf, TREE_VALUE (t)); /* Don't overlap auto-initialized types. */