Commit fba78abb by Richard Henderson Committed by Richard Henderson

re PR c/5623 (GCC 3.0.3 crashes when assigning pointer to an array of undefined…

re PR c/5623 (GCC 3.0.3 crashes when assigning pointer to an array of undefined size which is member of a struct)

        PR c/5623
        * c-typeck.c (incomplete_type_error): Handle flexible array members.

From-SVN: r49663
parent 65739e62
2002-02-10 Richard Henderson <rth@redhat.com>
PR c/5623
* c-typeck.c (incomplete_type_error): Handle flexible array members.
2002-02-10 Richard Henderson <rth@redhat.com>
PR c++/5624
* tree.c (append_random_chars): Don't abort if main_input_filename
does not exist.
......
......@@ -149,6 +149,11 @@ incomplete_type_error (value, type)
case ARRAY_TYPE:
if (TYPE_DOMAIN (type))
{
if (TYPE_MAX_VALUE (TYPE_DOMAIN (type)) == NULL)
{
error ("invalid use of flexible array member");
return;
}
type = TREE_TYPE (type);
goto retry;
}
......
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