From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23599 invoked by alias); 26 Jul 2007 11:32:45 -0000 Received: (qmail 23591 invoked by uid 22791); 26 Jul 2007 11:32:45 -0000 X-Spam-Check-By: sourceware.org Received: from mx2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 26 Jul 2007 11:32:42 +0000 Received: from Relay1.suse.de (mail2.suse.de [195.135.221.8]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.suse.de (Postfix) with ESMTP id 3805321714 for ; Thu, 26 Jul 2007 13:32:40 +0200 (CEST) Date: Thu, 26 Jul 2007 11:51:00 -0000 From: Richard Guenther To: gcc-patches@gcc.gnu.org Subject: [PATCH][C] Fix type problem in convert_for_assignment Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2007-07/txt/msg01902.txt.bz2 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 * 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); } }