From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8924 invoked by alias); 1 May 2002 13:16:05 -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 8878 invoked by uid 71); 1 May 2002 13:16:01 -0000 Resent-Date: 1 May 2002 13:16:01 -0000 Resent-Message-ID: <20020501131601.8874.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-To: nobody@gcc.gnu.org Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, thomas@koeller.dyndns.org Received:(qmail 25886 invoked from network); 1 May 2002 13:06:47 -0000 Received: from unknown (HELO mailout04.sul.t-online.com) (194.25.134.18) by sources.redhat.com with SMTP; 1 May 2002 13:06:47 -0000 Received: from fwd05.sul.t-online.de by mailout04.sul.t-online.com with smtp id 172tHo-0004ow-08; Wed, 01 May 2002 14:32:44 +0200 Received: from sarkovy.koeller.dyndns.org (520042739349-0001@[80.137.166.217]) by fmrl05.sul.t-online.com with esmtp id 172tHi-26nVKKC; Wed, 1 May 2002 14:32:38 +0200 Received: by sarkovy.koeller.dyndns.org (Postfix, from userid 500) id 57CF212000C; Wed, 1 May 2002 14:32:40 +0200 (CEST) Message-Id:<20020501123240.57CF212000C@sarkovy.koeller.dyndns.org> Date: Wed, 01 May 2002 06:16:00 -0000 From: thomas@koeller.dyndns.org To: gcc-gnats@gcc.gnu.org Cc: thomas@koeller.dyndns.org X-Send-Pr-Version:3.113 Subject: c++/6530: GCC 3.0.4 rejects legal code X-SW-Source: 2002-05/txt/msg00006.txt.bz2 List-Id: >Number: 6530 >Category: c++ >Synopsis: GCC 3.0.4 rejects legal code >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: rejects-legal >Submitter-Id: net >Arrival-Date: Wed May 01 06:16:00 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Thomas Koeller >Release: 3.0.4 >Organization: >Environment: System: Linux sarkovy.koeller.dyndns.org 2.4.18 #3 Sam Mär 23 01:29:53 CET 2002 i686 unknown Architecture: i686 host: i686-pc-linux-gnu build: i686-pc-linux-gnu target: i686-pc-linux-gnu configured with: /home/thomas/src/gnu/gcc-3.0.4/configure --prefix=/opt/gcc-v3 --enable-shared --with-gnu-as --with-gnu-ld --enable-threads=posix --enable-languages=c,c++ --with-system-zlib >Description: A member function of a class is invoked through a function pointer from within a static member function of the same class. This is a valid C++ construct, however, the compiler flags it as an error. >How-To-Repeat: Compile this program: /* GCC 3.0.4 bug demonstration program */ class A { void f1(void); static void f2(A &c); }; void A::f1(void) {} void A::f2(A &c) { void (A::*pf)(void); pf = &A::f1; c.*pf(); } Compiler output: bugdemo.cxx: In static member function `static void A::f2(A&)': bugdemo.cxx:15: pointer to member function called, but not in class scope >Fix: >Release-Note: >Audit-Trail: >Unformatted: