c-typeck.c (convert_for_assignment): Use the type of the member for the initialization.
2007-08-20 Richard Guenther <rguenther@suse.de> * c-typeck.c (convert_for_assignment): Use the type of the member for the initialization. From-SVN: r127646
This commit is contained in:
parent
5e2930c092
commit
ff7637ef1d
2 changed files with 6 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
2007-08-20 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
* c-typeck.c (convert_for_assignment): Use the type of
|
||||
the member for the initialization.
|
||||
|
||||
2007-08-20 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
* c-objc-common.c (c_disregard_inline_limits): Remove.
|
||||
|
|
|
@ -4039,6 +4039,7 @@ convert_for_assignment (tree type, tree rhs, enum impl_conv errtype,
|
|||
if (pedantic && (!fundecl || !DECL_IN_SYSTEM_HEADER (fundecl)))
|
||||
pedwarn ("ISO C prohibits argument conversion to union type");
|
||||
|
||||
rhs = fold_convert (TREE_TYPE (memb), rhs);
|
||||
return build_constructor_single (type, memb, rhs);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue