From: Richard Guenther <rguenther@suse.de>
To: gcc-patches@gcc.gnu.org
Subject: [PATCH][C] Fix type problem in convert_for_assignment
Date: Thu, 26 Jul 2007 11:51:00 -0000 [thread overview]
Message-ID: <Pine.LNX.4.64.0707261335520.10096@zhemvz.fhfr.qr> (raw)
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);
}
}
next reply other threads:[~2007-07-26 11:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-26 11:51 Richard Guenther [this message]
2007-08-11 19:00 ` Joseph S. Myers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.64.0707261335520.10096@zhemvz.fhfr.qr \
--to=rguenther@suse.de \
--cc=gcc-patches@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).