From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7510 invoked by alias); 21 Jun 2005 03:05:29 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 7482 invoked by uid 48); 21 Jun 2005 03:05:24 -0000 Date: Tue, 21 Jun 2005 03:05:00 -0000 Message-ID: <20050621030524.7481.qmail@sourceware.org> From: "pinskia at gcc dot gnu dot org" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20050621013546.22132.scott.tupaj@line6.com> References: <20050621013546.22132.scott.tupaj@line6.com> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c++/22132] Wrong code: upcasting a const class pointer to struct the class derives from X-Bugzilla-Reason: CC X-SW-Source: 2005-06/txt/msg02699.txt.bz2 List-Id: ------- Additional Comments From pinskia at gcc dot gnu dot org 2005-06-21 03:05 ------- I think this is invalid, you want: OBJ* p1 = const_cast(objPtr); but I don't have prove at this point if this invalid. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22132