Reading specs from /opt/gcc-3.3/lib/gcc-lib/i686-pc-linux-gnu/3.3.6/specs
Configured with: ../configure --prefix=/opt/gcc-3.3 --enable-languages=c,c++
Thread model: posix
gcc version 3.3.6 20050209 (prerelease)

The following compiles without errors on a vanilla build of gcc 3.3.5 and gcc
3.3.6. The 3.4 and 4.0 builds both correctly give an error while compiling this.

typedef void (*MyCall)(int j);
class P
{
private:
        MyCall  myCall;
};
class J
{
public:
        J(P* p) { p->myCall(5); }
};

-- 
           Summary: Allow to non-friend class to get access to function
                    pointer
           Product: gcc
           Version: 3.3.6
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: bobm75 at gmail dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-pc-linux
  GCC host triplet: i686-pc-linux
GCC target triplet: i686-pc-linux


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19869

Reply via email to