Commit 25a1019f by Richard Kenner

(build_enumerator): Apply default conversion to constant-expression.

From-SVN: r5258
parent 78af79ab
......@@ -5607,7 +5607,10 @@ build_enumerator (name, value)
if (value != 0)
{
if (TREE_CODE (value) == INTEGER_CST)
constant_expression_warning (value);
{
value = default_conversion (value);
constant_expression_warning (value);
}
else
{
error ("enumerator value for `%s' not integer constant",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment