c++/6628: cannot typedef const functions

ge@cs.twsu.edu ge@cs.twsu.edu
Fri May 10 13:56:00 GMT 2002


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



More information about the Gcc-bugs mailing list