From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19181 invoked by alias); 3 Sep 2011 11:32:14 -0000 Received: (qmail 19172 invoked by uid 22791); 3 Sep 2011 11:32:13 -0000 X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,TW_MZ X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 03 Sep 2011 11:32:00 +0000 From: "imzhuli at vip dot qq.com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/50282] pointer-to-member cast works incorrectly Date: Sat, 03 Sep 2011 11:32:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: imzhuli at vip dot qq.com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 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: 2011-09/txt/msg00205.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50282 --- Comment #2 from zhuli 2011-09-03 11:31:57 UTC --- I've never used any unint32_t tu hold any pointer-to-member, I just tested and find out the sizeof (pointer-to-member-function) is 16, then i used a pointer-to-uint32_t four times to dump the value of the pointer-to-member, 32bits by 32bits. According my understanding to the standard, this conversion should be valid, or there must be any valid way . (In reply to comment #1) > uint32_t isn't big enough to hold a pointer-to-member value, and that > conversion isn't valid anyway