From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15904 invoked by alias); 27 May 2004 20:29:28 -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 15892 invoked by uid 48); 27 May 2004 20:29:27 -0000 Date: Fri, 28 May 2004 14:46:00 -0000 Message-ID: <20040527202927.15891.qmail@sourceware.org> From: "leor at bdsoft dot com" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20040527163621.15684.gianni@mariani.ws> References: <20040527163621.15684.gianni@mariani.ws> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c++/15684] Pointer to member function called on incomplete type should diag X-Bugzilla-Reason: CC X-SW-Source: 2004-05/txt/msg03316.txt.bz2 List-Id: ------- Additional Comments From leor at bdsoft dot com 2004-05-27 20:29 ------- (In reply to comment #5) > I cannot find where in the C++ standard that this is invalid and in the thread it only says that they > contracted EDG, if you think this is an issue, raise it to comp.lang.c++.moderated instead and then > when they decide it is invalid you can reopen this bug. The citation from the standard is (5.5p3): 3 The binary operator ->* binds its second operand, which shall be of type "pointer to member of T" (where T is a completely-defined class type) to its first operand, which shall be of type "pointer to T" or "pointer to a class of which T is an unambiguous and accessible base class." The result is an object or a function of the type specified by the second operand. "where T is a completely-defined class type" is pretty cut-and-dried. Plus, as John Spicer has indicated to me in a private email: "An implementation could choose different forms of pointer-to-member representations depending on whether or not the class had virtual functions, or something like that. In such implemenations, a complete type would be needed to get correct behavior." -leor -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15684