public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: Jason Merrill <jason@redhat.com>
To: jason@gcc.gnu.org
Cc: gcc-prs@gcc.gnu.org,
Subject: Re: c++/6331: g++ 3.1 looses const qualifiers (C++ PATCH)
Date: Wed, 24 Apr 2002 03:56:00 -0000	[thread overview]
Message-ID: <20020424105602.23606.qmail@sources.redhat.com> (raw)

The following reply was made to PR c++/6331; it has been noted by GNATS.

From: Jason Merrill <jason@redhat.com>
To: Cc: gcc-patches@gcc.gnu.org, gcc-gnats@gcc.gnu.org
Subject: Re: c++/6331: g++ 3.1 looses const qualifiers (C++ PATCH)
Date: Wed, 24 Apr 2002 11:46:55 +0100

 --=-=-=
 
 Here's a patch for the World.ii bug.  We were winding up with a bogus
 version of 'const array of float' because we weren't consistently using the
 C++-specific build_qualified_type.
 
 Tested i686-pc-linux-gnu, applied trunk and 3.1.  Test in
 g++.dg/init/array3.C.
 
 2002-04-24  Jason Merrill  <jason@redhat.com>
 
 	PR c++/6331
 	* method.c (do_build_copy_constructor): Use cp_build_qualified_type.
 	* typeck.c (build_modify_expr): Allow arrays to differ in cv-quals.
 
 
 --=-=-=
 Content-Type: text/x-patch
 Content-Disposition: inline
 
 *** method.c.~1~	Sat Apr  6 15:33:41 2002
 --- method.c	Wed Apr 24 09:54:22 2002
 *************** do_build_copy_constructor (fndecl)
 *** 585,591 ****
   	    continue;
   
   	  init = build (COMPONENT_REF,
 ! 	                build_qualified_type (TREE_TYPE (field), cvquals),
   	                init, field);
   	  init = build_tree_list (NULL_TREE, init);
   
 --- 585,591 ----
   	    continue;
   
   	  init = build (COMPONENT_REF,
 ! 	                cp_build_qualified_type (TREE_TYPE (field), cvquals),
   	                init, field);
   	  init = build_tree_list (NULL_TREE, init);
   
 *** typeck.c.~1~	Wed Apr 24 01:02:20 2002
 --- typeck.c	Wed Apr 24 09:56:28 2002
 *************** build_modify_expr (lhs, modifycode, rhs)
 *** 5665,5674 ****
       {
         int from_array;
         
 !       if (!same_or_base_type_p (lhstype, TREE_TYPE (rhs)))
   	{
   	  error ("incompatible types in assignment of `%T' to `%T'",
 ! 		    TREE_TYPE (rhs), lhstype);
   	  return error_mark_node;
   	}
   
 --- 5665,5675 ----
       {
         int from_array;
         
 !       if (!same_or_base_type_p (TYPE_MAIN_VARIANT (lhstype),
 ! 				TYPE_MAIN_VARIANT (TREE_TYPE (rhs))))
   	{
   	  error ("incompatible types in assignment of `%T' to `%T'",
 ! 		 TREE_TYPE (rhs), lhstype);
   	  return error_mark_node;
   	}
   
 
 --=-=-=--


             reply	other threads:[~2002-04-24 10:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-24  3:56 Jason Merrill [this message]
2002-04-24 15:56 Jason Merrill
2002-04-25 11:06 Mark Mitchell

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=20020424105602.23606.qmail@sources.redhat.com \
    --to=jason@redhat.com \
    --cc=gcc-prs@gcc.gnu.org \
    --cc=jason@gcc.gnu.org \
    /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).