mirror of
git://gcc.gnu.org/git/gcc.git
synced 2024-12-30 15:25:49 +08:00
parse.y (check_inner_circular_reference): Ignore incomplete types.
2002-03-29 Tom Tromey <tromey@redhat.com> * parse.y (check_inner_circular_reference): Ignore incomplete types. (http://gcc.gnu.org/ml/gcc-patches/2002-03/msg01987.html) From-SVN: r51573
This commit is contained in:
parent
cb260b1181
commit
bce54832de
@ -1,3 +1,8 @@
|
||||
2002-03-29 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* parse.y (check_inner_circular_reference): Ignore incomplete
|
||||
types.
|
||||
|
||||
2002-03-29 Neil Booth <neil@daikokuya.demon.co.uk>
|
||||
|
||||
* Make-lang.in (builtins.o): Update.
|
||||
|
@ -5245,14 +5245,23 @@ check_inner_circular_reference (source, target)
|
||||
|
||||
if (!basetype_vec)
|
||||
return NULL_TREE;
|
||||
|
||||
|
||||
for (i = 0; i < TREE_VEC_LENGTH (basetype_vec); i++)
|
||||
{
|
||||
tree su = BINFO_TYPE (TREE_VEC_ELT (basetype_vec, i));
|
||||
tree su;
|
||||
|
||||
/* We can end up with a NULL_TREE or an incomplete type here if
|
||||
we encountered previous type resolution errors. It's safe to
|
||||
simply ignore these cases. */
|
||||
if (TREE_VEC_ELT (basetype_vec, i) == NULL_TREE)
|
||||
continue;
|
||||
su = BINFO_TYPE (TREE_VEC_ELT (basetype_vec, i));
|
||||
if (INCOMPLETE_TYPE_P (su))
|
||||
continue;
|
||||
|
||||
if (inherits_from_p (su, target))
|
||||
return lookup_cl (TYPE_NAME (su));
|
||||
|
||||
|
||||
for (ctx = DECL_CONTEXT (TYPE_NAME (su)); ctx; ctx = DECL_CONTEXT (ctx))
|
||||
{
|
||||
/* An enclosing context shouldn't be TARGET */
|
||||
|
Loading…
Reference in New Issue
Block a user