typeck.c (require_complete_type): Don't assume size_zero_node.
* typeck.c (require_complete_type): Don't assume size_zero_node. (complete_type_or_else): Likewise. From-SVN: r32605
This commit is contained in:
parent
91d024d568
commit
66cc4757b7
|
@ -1,3 +1,8 @@
|
||||||
|
2000-03-17 Nathan Sidwell <nathan@codesourcery.com>
|
||||||
|
|
||||||
|
* typeck.c (require_complete_type): Don't assume size_zero_node.
|
||||||
|
(complete_type_or_else): Likewise.
|
||||||
|
|
||||||
2000-03-16 Steven Grady <grady@digitaldeck.com>
|
2000-03-16 Steven Grady <grady@digitaldeck.com>
|
||||||
Jason Merrill <jason@casey.cygnus.com>
|
Jason Merrill <jason@casey.cygnus.com>
|
||||||
|
|
||||||
|
|
|
@ -106,8 +106,7 @@ require_complete_type (value)
|
||||||
type = TREE_TYPE (value);
|
type = TREE_TYPE (value);
|
||||||
|
|
||||||
/* First, detect a valid value with a complete type. */
|
/* First, detect a valid value with a complete type. */
|
||||||
if (TYPE_SIZE (type) != 0
|
if (TYPE_SIZE (type) && !integer_zerop (TYPE_SIZE (type)))
|
||||||
&& TYPE_SIZE (type) != size_zero_node)
|
|
||||||
return value;
|
return value;
|
||||||
|
|
||||||
/* If we see X::Y, we build an OFFSET_TYPE which has
|
/* If we see X::Y, we build an OFFSET_TYPE which has
|
||||||
|
@ -177,7 +176,7 @@ complete_type_or_else (type, value)
|
||||||
if (type == error_mark_node)
|
if (type == error_mark_node)
|
||||||
/* We already issued an error. */
|
/* We already issued an error. */
|
||||||
return NULL_TREE;
|
return NULL_TREE;
|
||||||
else if (!TYPE_SIZE (type) || TYPE_SIZE (type) == size_zero_node)
|
else if (!TYPE_SIZE (type) || integer_zerop (TYPE_SIZE (type)))
|
||||||
{
|
{
|
||||||
incomplete_type_error (value, type);
|
incomplete_type_error (value, type);
|
||||||
return NULL_TREE;
|
return NULL_TREE;
|
||||||
|
|
Loading…
Reference in New Issue