public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* c++/3448: class method as parameter
@ 2001-06-27 11:46 ibn
  0 siblings, 0 replies; 2+ messages in thread
From: ibn @ 2001-06-27 11:46 UTC (permalink / raw)
  To: gcc-gnats

>Number:         3448
>Category:       c++
>Synopsis:       class method as parameter
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jun 27 11:46:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     ibn@ut.ee
>Release:        gcc version 2.95.3-2 (cygwin special)
>Organization:
>Environment:
CygWin under Windows 98
>Description:
$ g++ kala.cc
kala.cc: In method `int X::csuperf(int (X::*)(int))':
kala.cc:43: Internal compiler error.
kala.cc:43: Please submit a full bug report.
kala.cc:43: See <URL: http://www.gnu.org/software/gcc/bugs.html > for instructions
.
>How-To-Repeat:
g++ kala.cc
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="Kala.cc"; name="Kala.cc"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="Kala.cc"

Ly8gcHJvb3ZpZmFpbAoKI2luY2x1ZGUgPHN0ZGlvLmg+CgpjbGFzcyBYCnsKCXB1YmxpYzoKCWlu
dCBjc3VwZXJmKGludCAoWDo6KiBmKShpbnQpKTsKCWludCBjYShpbnQpOwoJaW50IGNiKGludCk7
Cn07CgppbnQgc3VwZXJmKGludCBmKGludCkpOwppbnQgYShpbnQpOwppbnQgYihpbnQpOwoKaW50
IG1haW4oaW50IGFyZ2MsIGNoYXIqKiBhcmd2KQp7CglzdXBlcmYoJmEpOwoJWCB4OwoJeC5jc3Vw
ZXJmKCZYOjpjYSk7Cn0KCmludCBhKGludCBwKQp7CglwID0gcDsKCXByaW50ZigiYVxuIik7Cn0K
CmludCBiKGludCBwKQp7CglwID0gcDsKCXByaW50ZigiYlxuIik7Cn0KCmludCBzdXBlcmYoaW50
IGYoaW50KSkKewoJZig1KTsKfQoKaW50IFg6OmNzdXBlcmYoaW50IChYOjoqIGYpKGludCkpCnsK
CWYuKig2KTsKfQoKaW50IFg6Y2EoaW50IHApCnsKCXAgPSBwOwoJcHJpbnRmKCJjYSIpOwp9Cgpp
bnQgWDpjYihpbnQgcCkKewoJcCA9IHA7CglwcmludGYoImNiIik7Cn0K


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

* Re: c++/3448: class method as parameter
@ 2001-07-08  9:31 nathan
  0 siblings, 0 replies; 2+ messages in thread
From: nathan @ 2001-07-08  9:31 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, ibn, nobody

Synopsis: class method as parameter

State-Changed-From-To: open->closed
State-Changed-By: nathan
State-Changed-When: Sun Jul  8 09:31:45 2001
State-Changed-Why:
    gcc 3.0 reports
    3448.C: In function `int a(int)':
    3448.C:28: warning: control reaches end of non-void function
    3448.C: In function `int b(int)':
    3448.C:34: warning: control reaches end of non-void function
    3448.C: In function `int superf(int (*)(int))':
    3448.C:39: warning: control reaches end of non-void function
    3448.C: In member function `int X::csuperf(int (X::*)(int))':
    3448.C:43: `6' cannot be used as a member pointer, since it is of type `int'
    3448.C:44: warning: control reaches end of non-void function
    3448.C: At global scope:
    3448.C:46: syntax error before `:' token
    3448.C:49: ISO C++ forbids declaration of `printf' with no type
    3448.C:49: `int printf' redeclared as different kind of symbol
    /usr/include/stdio.h:254: previous declaration of `int printf(const char*, 
       ...)'
    3448.C:49: cannot convert `const char*' to `int' in initialization
    3448.C:50: parse error before `}' token
    3448.C:52: syntax error before `:' token
    3448.C:55: ISO C++ forbids declaration of `printf' with no type
    3448.C:55: redefinition of `int printf'
    3448.C:49: `int printf' previously defined here
    3448.C:55: cannot convert `const char*' to `int' in initialization
    3448.C:56: parse error before `}' token
    
    the error of significance is on line 43. A pointer to member
    is invoked by
    	(obj.*ptr) (args)
    or
    	(obj->*ptr) (args)

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=3448&database=gcc


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

end of thread, other threads:[~2001-07-08  9:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-06-27 11:46 c++/3448: class method as parameter ibn
2001-07-08  9:31 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).