* varasm.c (initializer_constant_valid_p): Allow NOP_EXPRs to
RECORD_TYPEs.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@80404
138bc75d-0d04-0410-961f-
82ee72b054a4
2004-04-04 Mark Mitchell <mark@codesourcery.com>
+ PR c++/14804
+ * varasm.c (initializer_constant_valid_p): Allow NOP_EXPRs to
+ RECORD_TYPEs.
+
+2004-04-04 Mark Mitchell <mark@codesourcery.com>
+
* doc/invoke.texi (-mabi=o64): Create link to O64 ABI
documentation.
endtype);
}
- /* Allow conversions to union types if the value inside is okay. */
- if (TREE_CODE (TREE_TYPE (value)) == UNION_TYPE)
+ /* Allow conversions to struct or union types if the value
+ inside is okay. */
+ if (TREE_CODE (TREE_TYPE (value)) == RECORD_TYPE
+ || TREE_CODE (TREE_TYPE (value)) == UNION_TYPE)
return initializer_constant_valid_p (TREE_OPERAND (value, 0),
endtype);
break;