(output_constructor): Use the type given by the constructor expression only if available.
(output_constructor): Use the type given by the constructor expression only if available. Otherwise use the type of the declared type. From-SVN: r5390
This commit is contained in:
parent
538d56bb75
commit
1108dc3d1f
@ -3396,7 +3396,11 @@ output_constructor (exp, size)
|
||||
|
||||
if (TREE_CODE (TREE_TYPE (exp)) == RECORD_TYPE
|
||||
|| TREE_CODE (TREE_TYPE (exp)) == UNION_TYPE)
|
||||
field = TREE_PURPOSE (link);
|
||||
{
|
||||
/* if available, use the type given by link */
|
||||
if (TREE_PURPOSE (link) != 0)
|
||||
field = TREE_PURPOSE (link);
|
||||
}
|
||||
|
||||
if (TREE_CODE (TREE_TYPE (exp)) == ARRAY_TYPE)
|
||||
index = TREE_PURPOSE (link);
|
||||
|
Loading…
x
Reference in New Issue
Block a user