delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/03/01/13:40:32

Message-ID: <34F9AB3D.AB387C24@pacificnet.net>
Date: Sun, 01 Mar 1998 10:38:54 -0800
From: Ralph Gesler <rgesler AT pacificnet DOT net>
MIME-Version: 1.0
To: Nate Eldredge <eldredge AT ap DOT net>
CC: Steve Marton <istvan AT outer-net DOT com>, djgpp AT delorie DOT com
Subject: Re: Problem with C++ and function
References: <199802282007 DOT MAA15173 AT adit DOT ap DOT net>


Nate Eldredge wrote:

> At 07:12  2/27/1998 GMT, Steve Marton wrote:
> >I'm trying to point to a member function of a class. But for some
> >reason, its address &Class::f is always 1. Even in Class::f1(){&f==1}.
> >That's the same for any member function. How come? How can I point to
> >it?
>
> Did you find this out by doing something like `cout << &f'? If so, the
> problem is not in the address at all, but is a known bug in the routine that
> prints it out. Try `cout << (unsigned)&f', or actually check the result of
> `&f == (void *)1' in the code.
>
> Nate Eldredge
> eldredge AT ap DOT net

Thanks for your response to the original message. I was having the exact problem
you alluded to, and your work-around was the answer.  Is there somewhere that a
list of known bugs in DJGPP and/or the libraries can be found? I checked have
checked the DJGPP info and no known bugs are listed.

Ralph Gesler

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019