projects
/
platform
/
upstream
/
linaro-gcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
64efc96
)
(finish_struct): Handle nested struct redefinitions.
author
rms
<rms@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 15 Jul 1992 18:39:52 +0000
(18:39 +0000)
committer
rms
<rms@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 15 Jul 1992 18:39:52 +0000
(18:39 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@1593
138bc75d
-0d04-0410-961f-
82ee72b054a4
gcc/c-decl.c
patch
|
blob
|
history
diff --git
a/gcc/c-decl.c
b/gcc/c-decl.c
index
bbcec2e
..
5a730e8
100644
(file)
--- a/
gcc/c-decl.c
+++ b/
gcc/c-decl.c
@@
-4664,6
+4664,11
@@
finish_struct (t, fieldlist)
if (C_DECL_VARIABLE_SIZE (x))
C_TYPE_VARIABLE_SIZE (t) = 1;
+ /* Detect invalid nested redefinition. */
+ if (TREE_TYPE (x) == t)
+ error ("nested redefinition of `%s'",
+ IDENTIFIER_POINTER (TYPE_NAME (t)));
+
/* Detect invalid bit-field size. */
if (DECL_INITIAL (x))
STRIP_NOPS (DECL_INITIAL (x));