* [PATCH][C] Fix type problem in convert_for_assignment
@ 2007-07-26 11:51 Richard Guenther
2007-08-11 19:00 ` Joseph S. Myers
0 siblings, 1 reply; 2+ messages in thread
From: Richard Guenther @ 2007-07-26 11:51 UTC (permalink / raw)
To: gcc-patches
This is all what remains for C type fixes in my tree.
Boostrapped and tested on x86_64-unknown-linux-gnu.
Ok for mainline?
Thanks,
Richard.
2007-07-13 Richard Guenther <rguenther@suse.de>
* c-typeck.c (convert_for_assignment): Use the type of
the member for the initialization.
Index: gcc/c-typeck.c
===================================================================
*** gcc/c-typeck.c.orig 2007-07-26 12:26:29.000000000 +0200
--- gcc/c-typeck.c 2007-07-26 12:28:35.000000000 +0200
*************** convert_for_assignment (tree type, tree
*** 4035,4040 ****
--- 4035,4041 ----
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);
}
}
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH][C] Fix type problem in convert_for_assignment
2007-07-26 11:51 [PATCH][C] Fix type problem in convert_for_assignment Richard Guenther
@ 2007-08-11 19:00 ` Joseph S. Myers
0 siblings, 0 replies; 2+ messages in thread
From: Joseph S. Myers @ 2007-08-11 19:00 UTC (permalink / raw)
To: Richard Guenther; +Cc: gcc-patches
On Thu, 26 Jul 2007, Richard Guenther wrote:
> This is all what remains for C type fixes in my tree.
>
> Boostrapped and tested on x86_64-unknown-linux-gnu.
>
> Ok for mainline?
>
> Thanks,
> Richard.
>
> 2007-07-13 Richard Guenther <rguenther@suse.de>
>
> * c-typeck.c (convert_for_assignment): Use the type of
> the member for the initialization.
OK.
--
Joseph S. Myers
joseph@codesourcery.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-08-11 19:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-07-26 11:51 [PATCH][C] Fix type problem in convert_for_assignment Richard Guenther
2007-08-11 19:00 ` Joseph S. Myers
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).