public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: nathan@gcc.gnu.org
To: gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, ibn@ut.ee, nobody@gcc.gnu.org
Subject: Re: c++/3448: class method as parameter
Date: Sun, 08 Jul 2001 09:31:00 -0000	[thread overview]
Message-ID: <20010708163145.1767.qmail@sourceware.cygnus.com> (raw)

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


             reply	other threads:[~2001-07-08  9:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-07-08  9:31 nathan [this message]
  -- strict thread matches above, loose matches on Subject: below --
2001-06-27 11:46 ibn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20010708163145.1767.qmail@sourceware.cygnus.com \
    --to=nathan@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    --cc=gcc-prs@gcc.gnu.org \
    --cc=ibn@ut.ee \
    --cc=nobody@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).