projects
/
gcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c841050
)
(variable_size): Better error for div by 0 in size.
author
Richard Stallman
<rms@gnu.org>
Fri, 12 Mar 1993 23:17:41 +0000
(23:17 +0000)
committer
Richard Stallman
<rms@gnu.org>
Fri, 12 Mar 1993 23:17:41 +0000
(23:17 +0000)
From-SVN: r3722
gcc/stor-layout.c
patch
|
blob
|
history
diff --git
a/gcc/stor-layout.c
b/gcc/stor-layout.c
index c86fc004e28f0b187c40020beb9f0aa2eac0cd54..1224348a0344ce246b825acd61360e9c5f4fd326 100644
(file)
--- a/
gcc/stor-layout.c
+++ b/
gcc/stor-layout.c
@@
-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);
}