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]

[Bug c++/37885] New: Accepts invalid CV qualifiers on member function returning function pointer


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


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