This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

c++/6628: cannot typedef const functions



>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:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]