From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11946 invoked by alias); 25 Apr 2003 15:04:07 -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 11922 invoked by uid 48); 25 Apr 2003 15:04:07 -0000 Date: Fri, 25 Apr 2003 15:04:00 -0000 Message-ID: <20030425150407.11921.qmail@sources.redhat.com> To: benko@sztaki.hu, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, nobody@gcc.gnu.org From: bangerth@dealii.org Reply-To: bangerth@dealii.org, benko@sztaki.hu, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, nobody@gcc.gnu.org, gcc-gnats@gcc.gnu.org Subject: Re: c++/10496: erroneus suggestion in diagnostic X-SW-Source: 2003-04/txt/msg01100.txt.bz2 List-Id: Old Synopsis: erroneus suggestion in diagnostic and possible bug New Synopsis: erroneus suggestion in diagnostic State-Changed-From-To: open->analyzed State-Changed-By: bangerth State-Changed-When: Fri Apr 25 15:04:06 2003 State-Changed-Why: Confirmed. Though the example you gave is wrong (it compiles cleanly, what you wanted is just &f). With this --------------------------- struct X { void f() const { &f; } }; ------------------------ I get indeed g/x> /home/bangerth/bin/gcc-3.3-pre/bin/c++ -c x.cc x.cc: In member function `void X::f() const': x.cc:3: error: ISO C++ forbids taking the address of an unqualified non-static member function to form a pointer to member function. Say `&const X::f' gcc is right to require you to qualify f with the class name, i.e. write &X::f, but the "const" in the error message is wrong, of course. This is a bug I see in every version 2.95 ... 3.4. W. http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10496