Commit 8d7bbe5f by Richard Stallman

(finish_struct): Handle nested struct redefinitions.

From-SVN: r1593
parent e0b382b1
......@@ -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));
......
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