projects
/
gcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6cb72a7
)
(layout_record): Handle NULL dsize.
author
Richard Stallman
<rms@gnu.org>
Wed, 15 Jul 1992 18:39:27 +0000
(18:39 +0000)
committer
Richard Stallman
<rms@gnu.org>
Wed, 15 Jul 1992 18:39:27 +0000
(18:39 +0000)
From-SVN: r1592
gcc/stor-layout.c
patch
|
blob
|
history
diff --git
a/gcc/stor-layout.c
b/gcc/stor-layout.c
index 7c4ef96b3cf39d1008153792dc863fcef18d4068..e2202844ceda94c9356327f9976d21d0b9f30e9f 100644
(file)
--- a/
gcc/stor-layout.c
+++ b/
gcc/stor-layout.c
@@
-430,7
+430,12
@@
layout_record (rec)
{
register tree dsize = DECL_SIZE (field);
- if (TREE_CODE (dsize) == INTEGER_CST)
+ /* This can happen when we have an invalid nested struct definition,
+ such as struct j { struct j { int i; } }. The error message is
+ printed in finish_struct. */
+ if (dsize == 0)
+ /* Do nothing. */;
+ else if (TREE_CODE (dsize) == INTEGER_CST)
const_size += TREE_INT_CST_LOW (dsize);
else
{