This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][C++] Type fixes for the C++ frontend
- From: Mark Mitchell <mark at codesourcery dot com>
- To: Richard Guenther <rguenther at suse dot de>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Sun, 05 Aug 2007 20:29:47 -0700
- Subject: Re: [PATCH][C++] Type fixes for the C++ frontend
- References: <Pine.LNX.4.64.0707261337350.10096@zhemvz.fhfr.qr>
Richard Guenther wrote:
> 2007-07-13 Richard Guenther <rguenther@suse.de>
>
> 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