public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Mark Mitchell <mark@codesourcery.com>
To: Richard Guenther <rguenther@suse.de>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH][C++] Type fixes for the C++ frontend
Date: Mon, 06 Aug 2007 03:30:00 -0000	[thread overview]
Message-ID: <46B695AB.2060606@codesourcery.com> (raw)
In-Reply-To: <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

  reply	other threads:[~2007-08-06  3:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-26 11:53 Richard Guenther
2007-08-06  3:30 ` Mark Mitchell [this message]
2007-08-20 12:57   ` Richard Guenther

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=46B695AB.2060606@codesourcery.com \
    --to=mark@codesourcery.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=rguenther@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).