From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24138 invoked by alias); 20 Aug 2007 12:32:46 -0000 Received: (qmail 23999 invoked by uid 22791); 20 Aug 2007 12:32:44 -0000 X-Spam-Check-By: sourceware.org Received: from ns.suse.de (HELO mx1.suse.de) (195.135.220.2) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 20 Aug 2007 12:32:35 +0000 Received: from Relay2.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 mx1.suse.de (Postfix) with ESMTP id 3F31F1241F; Mon, 20 Aug 2007 14:32:33 +0200 (CEST) Date: Mon, 20 Aug 2007 12:57:00 -0000 From: Richard Guenther To: Mark Mitchell Cc: gcc-patches@gcc.gnu.org Subject: Re: [PATCH][C++] Type fixes for the C++ frontend In-Reply-To: <46B695AB.2060606@codesourcery.com> Message-ID: References: <46B695AB.2060606@codesourcery.com> 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-08/txt/msg01264.txt.bz2 On Sun, 5 Aug 2007, Mark Mitchell wrote: > Richard Guenther wrote: > > > 2007-07-13 Richard Guenther > > > > PR c++/22369 > > PR c++/22451 > > * call.c (build_new_method_call): Convert initializer to > > the basetype. > > * init.c (build_aggr_init): Do not fiddle with types. > > (build_vec_delete_1): Use correct type for POINTER_PLUS_EXPR. > > * except.c (build_throw): Do not drop qualifiers for the > > pointer type. > > * typeck.c (get_member_function_from_ptrfunc): Do not > > fiddle with types, instead convert. > > (build_ptrmemfunc1): Convert to the target type for > > initialization. > > (gfc_trans_allocate): Convert result to target type. > > * cp-objcp-common.c (cxx_get_alias_set): Pointers to > > pointer-to-member structures shall have alias set zero as well. > > OK with one minor change. > > > Index: gcc/cp/call.c > > =================================================================== > > *** gcc/cp/call.c.orig 2007-07-26 12:26:08.000000000 +0200 > > --- gcc/cp/call.c 2007-07-26 12:28:35.000000000 +0200 > > *************** build_new_method_call (tree instance, tr > > *** 5503,5508 **** > > --- 5503,5515 ---- > > name = complete_dtor_identifier; > > } > > > > + if (DECL_CONSTRUCTOR_P (fn)) > > + { > > + tree type = build_pointer_type (basetype); > > + if (!same_type_p (type, TREE_TYPE (instance_ptr))) > > + instance_ptr = build_nop (type, instance_ptr); > > + } > > + > > This duplicates the code just above it; please share the code. Is the > rationale the same as well, i.e., that this is about cv-qualification? > (We shouldn't have any differences other than cv-qualification at this > point, I should hope...) Yes, they are all about CV qualifications. Done and committed as r127647. Richard. -- Richard Guenther Novell / SUSE Labs SUSE LINUX Products GmbH - Nuernberg - AG Nuernberg - HRB 16746 - GF: Markus Rex