This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/37885] New: Accepts invalid CV qualifiers on member function returning function pointer
- From: "witmer at averagesoftware dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 21 Oct 2008 18:11:05 -0000
- Subject: [Bug c++/37885] New: Accepts invalid CV qualifiers on member function returning function pointer
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
GCC accepts the following:
class Object
{
void (*Funk())() const;
};
const in this context should be a qualifier on a returned
pointer-to-member-function. Intel and Comeau both reject this code.
The correct form:
class Object
{
void (*Funk() const)();
};
is correctly accepted by GCC.
--
Summary: Accepts invalid CV qualifiers on member function
returning function pointer
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: witmer at averagesoftware dot org
GCC host triplet: i486-pclinux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37885