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
This commit is contained in:
parent
65739e62e4
commit
fba78abb53
@ -1,3 +1,8 @@
|
||||
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
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user