From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18737 invoked by alias); 13 Oct 2007 06:05:20 -0000 Received: (qmail 18104 invoked by alias); 13 Oct 2007 06:05:10 -0000 Date: Sat, 13 Oct 2007 06:05:00 -0000 Message-ID: <20071013060510.18103.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug c++/26698] [4.0/4.1/4.2/4.3 Regression] g++ accepts const-incorrect code due to conversion function In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "simartin at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2007-10/txt/msg01287.txt.bz2 ------- Comment #14 from simartin at gcc dot gnu dot org 2007-10-13 06:05 ------- Subject: Bug 26698 Author: simartin Date: Sat Oct 13 06:04:57 2007 New Revision: 129282 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=129282 Log: gcc/cp/ 2007-10-13 Simon Martin PR c++/26698 * call.c (build_user_type_conversion_1): Do not consider conversion functions to convert a (possibly cv-qualified) object to the (possibly cv-qualified) same object type (or a reference to it), to a (possibly cv-qualified) base class of that type (or a reference to it). gcc/testsuite/ 2007-10-13 Simon Martin PR c++/26698 * g++.dg/conversion/op4.C: New test. Added: branches/gcc-4_2-branch/gcc/testsuite/g++.dg/conversion/op4.C Modified: branches/gcc-4_2-branch/gcc/cp/ChangeLog branches/gcc-4_2-branch/gcc/cp/call.c branches/gcc-4_2-branch/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26698