From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21505 invoked by alias); 6 Aug 2007 03:30:00 -0000 Received: (qmail 21492 invoked by uid 22791); 6 Aug 2007 03:30:00 -0000 X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 06 Aug 2007 03:29:58 +0000 Received: (qmail 7103 invoked from network); 6 Aug 2007 03:29:56 -0000 Received: from unknown (HELO ?192.168.0.3?) (mitchell@127.0.0.2) by mail.codesourcery.com with ESMTPA; 6 Aug 2007 03:29:56 -0000 Message-ID: <46B695AB.2060606@codesourcery.com> Date: Mon, 06 Aug 2007 03:30:00 -0000 From: Mark Mitchell User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) MIME-Version: 1.0 To: Richard Guenther CC: gcc-patches@gcc.gnu.org Subject: Re: [PATCH][C++] Type fixes for the C++ frontend References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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/msg00296.txt.bz2 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...) -- Mark Mitchell CodeSourcery mark@codesourcery.com (650) 331-3385 x713