[PATCH][C++] Type fixes for the C++ frontend
Richard Guenther
rguenther@suse.de
Mon Aug 20 12:57:00 GMT 2007
On Sun, 5 Aug 2007, Mark Mitchell wrote:
> 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...)
Yes, they are all about CV qualifications. Done and committed as r127647.
Richard.
--
Richard Guenther <rguenther@suse.de>
Novell / SUSE Labs
SUSE LINUX Products GmbH - Nuernberg - AG Nuernberg - HRB 16746 - GF: Markus Rex
More information about the Gcc-patches
mailing list