(variable_size): Better error for div by 0 in size.
authorRichard Stallman <rms@gnu.org>
Fri, 12 Mar 1993 23:17:41 +0000 (23:17 +0000)
committerRichard Stallman <rms@gnu.org>
Fri, 12 Mar 1993 23:17:41 +0000 (23:17 +0000)
From-SVN: r3722

gcc/stor-layout.c

index c86fc004e28f0b187c40020beb9f0aa2eac0cd54..1224348a0344ce246b825acd61360e9c5f4fd326 100644 (file)
@@ -81,7 +81,11 @@ variable_size (size)
 
   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);
     }