Commit e89a9554 by Zack Weinberg Committed by Zack Weinberg

c-typeck.c (c_expand_start_case): Return immediately if exp is an ERROR_MARK.

1999-08-27 00:27 -0700  Zack Weinberg  <zack@bitmover.com>

	* c-typeck.c (c_expand_start_case): Return immediately if exp
	is an ERROR_MARK.
	* fold-const.c (operand_equal_p): Return immediately if arg1
	or arg0 are ERROR_MARKs.
	* stor-layout.c (layout_type [case RECORD_TYPE]): Ignore
	fields of type ERROR_MARK when calculating if the record can
	go in a register.

From-SVN: r28923
parent 2dc36fe3
1999-08-27 00:27 -0700 Zack Weinberg <zack@bitmover.com>
* c-typeck.c (c_expand_start_case): Return immediately if exp
is an ERROR_MARK.
* fold-const.c (operand_equal_p): Return immediately if arg1
or arg0 are ERROR_MARKs.
* stor-layout.c (layout_type [case RECORD_TYPE]): Ignore
fields of type ERROR_MARK when calculating if the record can
go in a register.
Fri Aug 27 01:03:48 1999 Jim Kingdon <http://developer.redhat.com> Fri Aug 27 01:03:48 1999 Jim Kingdon <http://developer.redhat.com>
with much help from Jeffrey A Law and Richard Henderson with much help from Jeffrey A Law and Richard Henderson
......
...@@ -6706,8 +6706,14 @@ tree ...@@ -6706,8 +6706,14 @@ tree
c_expand_start_case (exp) c_expand_start_case (exp)
tree exp; tree exp;
{ {
register enum tree_code code = TREE_CODE (TREE_TYPE (exp)); register enum tree_code code;
tree type = TREE_TYPE (exp); tree type;
if (TREE_CODE (exp) == ERROR_MARK)
return exp;
code = TREE_CODE (TREE_TYPE (exp));
type = TREE_TYPE (exp);
if (code != INTEGER_TYPE && code != ENUMERAL_TYPE && code != ERROR_MARK) if (code != INTEGER_TYPE && code != ENUMERAL_TYPE && code != ERROR_MARK)
{ {
......
...@@ -2091,6 +2091,8 @@ operand_equal_p (arg0, arg1, only_const) ...@@ -2091,6 +2091,8 @@ operand_equal_p (arg0, arg1, only_const)
if (TREE_CODE (arg0) != TREE_CODE (arg1) if (TREE_CODE (arg0) != TREE_CODE (arg1)
/* This is needed for conversions and for COMPONENT_REF. /* This is needed for conversions and for COMPONENT_REF.
Might as well play it safe and always test this. */ Might as well play it safe and always test this. */
|| TREE_CODE (TREE_TYPE (arg0)) == ERROR_MARK
|| TREE_CODE (TREE_TYPE (arg1)) == ERROR_MARK
|| TYPE_MODE (TREE_TYPE (arg0)) != TYPE_MODE (TREE_TYPE (arg1))) || TYPE_MODE (TREE_TYPE (arg0)) != TYPE_MODE (TREE_TYPE (arg1)))
return 0; return 0;
......
...@@ -936,7 +936,8 @@ layout_type (type) ...@@ -936,7 +936,8 @@ layout_type (type)
{ {
int bitpos; int bitpos;
if (TREE_CODE (field) != FIELD_DECL) if (TREE_CODE (field) != FIELD_DECL
|| TREE_CODE (TREE_TYPE (field)) == ERROR_MARK)
continue; continue;
if (TYPE_MODE (TREE_TYPE (field)) == BLKmode if (TYPE_MODE (TREE_TYPE (field)) == BLKmode
......
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