From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13508 invoked by alias); 16 May 2003 22:16:24 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 13435 invoked by uid 48); 16 May 2003 22:16:24 -0000 Date: Fri, 16 May 2003 22:16:00 -0000 Message-ID: <20030516221624.13434.qmail@sources.redhat.com> To: andre.maute@gmx.de, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, nobody@gcc.gnu.org From: giovannibajo@libero.it Reply-To: giovannibajo@libero.it, andre.maute@gmx.de, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, nobody@gcc.gnu.org, gcc-gnats@gcc.gnu.org Subject: Re: c++/10827: member function pointer array link problem X-SW-Source: 2003-05/txt/msg01898.txt.bz2 List-Id: Synopsis: member function pointer array link problem State-Changed-From-To: open->closed State-Changed-By: bajo State-Changed-When: Fri May 16 22:16:23 2003 State-Changed-Why: Not a bug. ISO C++ standard mandates that you must always define static const member variables, even if initialized at declaration time. Quoting ยง9.4.2p4: "If a static data member is of const integral or const enumeration type, its declaration in the class definition can specify a constant-initializer which shall be an integral constant expression. [...] The member shall still be defined in a namespace scope if it is used in the program and the namespace scope definition shall not contain an initializer." This leads us to the second problem of your code: ISO C++ allows in-class initialization only for static const member of integral or enumeration type. In your case, the member type is neither integral or enumeration, so the code is ill-formed. It used to be accepted for a GCC extension (if you try to compile with -pedantic, you get a warning about it), but the extension has been removed already in GCC 3.3. I suggest to update your code to reflect this (just initialize the member at namescope definition). http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10827