public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* c++/4047: assuming & on overloaded member functions
@ 2001-08-17 10:16 yuzhang
0 siblings, 0 replies; 2+ messages in thread
From: yuzhang @ 2001-08-17 10:16 UTC (permalink / raw)
To: gcc-gnats
>Number: 4047
>Category: c++
>Synopsis: assuming & on overloaded member functions
>Confidential: no
>Severity: critical
>Priority: high
>Responsible: unassigned
>State: open
>Class: rejects-legal
>Submitter-Id: net
>Arrival-Date: Fri Aug 17 10:16:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: Yu Zhang
>Release: 2.95.2, 2.95.3
>Organization:
>Environment:
suse7.0, suse7.2
>Description:
when we use an overloaded static member function as
another function's input argument, g++ report "assuming
& on overloaded member functions".
This bug does not appear in GCC3.0, though I haven't seen a
similar bug report before.
>How-To-Repeat:
#include <stdio.h>
typedef int (*COMPTR) (char*, void*);
class Component
{
public:
static int foo(char* str, void* ptr)
{
return 888;
};
static int foo(int x)
{
return -x;
};
};
class Server
{
public:
void use(COMPTR func)
{
printf("%i\n",func("1234", NULL));
};
};
Server server;
template<class T>
class User
{
public:
void call()
{
server.use(T::foo);
};
};
int main()
{
User<Component> uc;
uc.call();
}
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: c++/4047: assuming & on overloaded member functions
@ 2001-09-04 8:34 nathan
0 siblings, 0 replies; 2+ messages in thread
From: nathan @ 2001-09-04 8:34 UTC (permalink / raw)
To: gcc-bugs, gcc-prs, nobody, yuzhang
Synopsis: assuming & on overloaded member functions
State-Changed-From-To: open->closed
State-Changed-By: nathan
State-Changed-When: Tue Sep 4 08:34:24 2001
State-Changed-Why:
As you say, this is fixed in 3.0.1
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=4047&database=gcc
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2001-09-04 8:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-08-17 10:16 c++/4047: assuming & on overloaded member functions yuzhang
2001-09-04 8:34 nathan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).