public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Before you release 1.0.3 -- please!
@ 1998-04-28 21:59 Mark Schaefer
  1998-04-30 20:03 ` Joe Buck
  0 siblings, 1 reply; 2+ messages in thread
From: Mark Schaefer @ 1998-04-28 21:59 UTC (permalink / raw)
  To: egcs

    ECGS developers,

    Before you send the next release out the door, could someone figure
out what you're going to do about the NULL problem.  Basically, it's a
damned if I do, damned if I don't problem.

    Since you use __null, which is a "magic pointer entity" that can
supposedly point to anything.  I've discovered that it's not very good
at pointing to, say, class member functions.

A test case is attached.  This one I actually verified to have the
error.

test1.C
[schaefer@liz]$ gcc -o test1 test1.C
test1.C: In function `int main(int, char **)':
test1.C:18: cannot convert `0' from type `{unknown type} *' to type
`void (UiCallbackHandler::*)(int, int, int)'

test2.C
[schaefer@liz]$ gcc -o test2 test2.C
test2.C: In function `int main(int, char **)':
test2.C:18: no matching function for call to
`UiCallbackHandler::addCallback (int, int, const int &, int)'
test2.C:11: candidates are: UiCallbackHandler::addCallback(int, int,
void (UiCallbackHandler::*)(int, int, int), int)

Note: (after switching the include to <sys/types.h>, both examples
compile on the SGI 7.2 compiler).
They should compile on any ANSI C++ standard (or nearly standard)
compiler.

Please, oh please figure out something to do with this!

--
Mark Schaefer


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Before you release 1.0.3 -- please!
  1998-04-28 21:59 Before you release 1.0.3 -- please! Mark Schaefer
@ 1998-04-30 20:03 ` Joe Buck
  0 siblings, 0 replies; 2+ messages in thread
From: Joe Buck @ 1998-04-30 20:03 UTC (permalink / raw)
  To: Mark Schaefer; +Cc: egcs

>     Before you send the next release out the door, could someone figure
> out what you're going to do about the NULL problem.  Basically, it's a
> damned if I do, damned if I don't problem.

The workaround is to use 0 in your code for function pointers or
member function pointers.  I doubt if this is going to be fixed before
1.0.3, since the only purpose of 1.0.3 is to fix so-called showstopper
bugs, not bugs with simple workarounds.

> int main(int, char**)
> {
>     UiCallbackHandler a;
>     a.addCallback (1,1,NULL,1);
> }

s/NULL/0/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1998-04-30 20:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-04-28 21:59 Before you release 1.0.3 -- please! Mark Schaefer
1998-04-30 20:03 ` Joe Buck

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).