This is the mail archive of the 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]

Overloaded m/fs


Not being an ANSI C++ guru I'm not sure if this is a bug or not.
Suffice to say it was OK with gcc-2.8.1

The following code:

void func( void (*)( int ) ) {

class A
    A( void ) {
        func( &mf );

    static void mf( int );
    void mf( char );

When compiled with:

gcc -c -Wall ol.cxx


ol.cxx: In method `A::A()':
ol.cxx:9: warning: converting from `void (A::*)(char)' to `void

It looks like an error to me since clearly there is a m/f that matches
exactly and it is not being used.

Hope this is useful.  Take care.


OSF1 verdi V4.0 564 alpha
egcs configured with
   --prefix=/usr/xlocal --with-gnu-as

config.guess gave:

stage1 built with gcc 2.8.1

gcc -v gave:
    gcc version egcs-2.91.57 19980901 (egcs-1.1 release)

The opinions expressed here are personal and do not necessarily
reflect the opinions of NATS or the opinions of my colleagues.

Mike Reed               Tel:   +44 (0) 171 832 5211
NATS Ltd                Fax:   +44 (0) 171 832 5658   
CAA House, K4G5      e-mail:
45-59 Kingsway
London WC2B 6TE
United Kingdom

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