Commit 80f9c711 by Richard Stallman

(variable_size): Better error for div by 0 in size.

From-SVN: r3722
parent c841050e
...@@ -81,7 +81,11 @@ variable_size (size) ...@@ -81,7 +81,11 @@ variable_size (size)
if (global_bindings_p ()) if (global_bindings_p ())
{ {
error ("variable-size type declared outside of any function"); if (TREE_CONSTANT (size))
error ("type size can't be explicitly evaluated");
else
error ("variable-size type declared outside of any function");
return size_int (1); return size_int (1);
} }
......
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