This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/13986] [3.4/3.5 regression] Unnecessary access check for copy constructor
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 2 Feb 2004 22:17:02 -0000
- Subject: [Bug c++/13986] [3.4/3.5 regression] Unnecessary access check for copy constructor
- References: <20040202220345.13986.bangerth@dealii.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-02-02 22:16 -------
This is a dup of bug 12226 which made these checks be there. GCC is correct to error out here.
>From section 8.5.3, paragraph 5: "If the initializer expression is an rvalue, with T2 a class type, and cv1
T1 is reference-compatible with cv2 T2, the reference is bound in one of the following ways
[description of the two ways omitted] ... The constructor that would be used to make the copy shall be
callable whether or not the copy is actually done."
*** This bug has been marked as a duplicate of 12226 ***
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |DUPLICATE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13986