Commit 66cc4757 by Nathan Sidwell Committed by Nathan Sidwell

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
parent 91d024d5
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) ...@@ -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) ...@@ -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;
......
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