This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
c++/6628: cannot typedef const functions
- From: ge at cs dot twsu dot edu
- To: gcc-gnats at gcc dot gnu dot org
- Cc: cannot at sources dot redhat dot com, typedef at sources dot redhat dot com, const at sources dot redhat dot com, functions at sources dot redhat dot com
- Date: 10 May 2002 20:52:39 -0000
- Subject: c++/6628: cannot typedef const functions
- Reply-to: ge at cs dot twsu dot edu
>Number: 6628
>Category: c++
>Synopsis: cannot typedef const functions
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri May 10 13:56:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: ge@cs.twsu.edu
>Release: gcc version 3.0.4
>Organization:
>Environment:
gcc version 3.0.4 (Mandrake Linux 8.2 3.0.4-2mdk)
>Description:
// t.cc
#include <string>
struct Person { void print (); std::string name_; };
typedef void (Person::*MF)() const;
typedef void FVC (void) const;
The last line caused the following error message:
t.cc:4: invalid type qualifier for non-member function type
t.cc:4: `const' and `volatile' function specifiers on `FVC' invalid in type
>How-To-Repeat:
cut and paste the 4 lines of source code to a file, and the
compile it with g++-3.0.4.
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: