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

Re: c++/561


The following reply was made to PR c++/561; it has been noted by GNATS.

From: nathan@gcc.gnu.org
To: sebor@roguewave.com, dmies@bluekite.com, gcc-gnats@gcc.gnu.org,
  gudjon.gunnarsson@mscsoftware.com, nobody@gcc.gnu.org
Cc:  
Subject: Re: c++/561
Date: 25 Sep 2000 12:36:12 -0000

 Synopsis: Compiler Error Casting Overloaded Function Pointers
 
 State-Changed-From-To: open->closed
 State-Changed-By: nathan
 State-Changed-When: Mon Sep 25 05:36:12 2000
 State-Changed-Why:
     The code is ill-formed.
     [13.4]/1 enumerates when overload resolution is applied to
     address of member function. The last option applies here
     (an explicit type conversion). The paragraph states 'the
     function selected is the one whose type matches the target
     type required in the context' In this case `void (A::*)()'.
     Neither choice matches that type, so the diagnostic is
     required.
     
     You are attempting to perform both overload resolution and
     the downcast of a pointer-to-member in a single cast --
     that's too much for C++. Please let me know if the desired
     behaviour is explicitly documented as an extension in those
     compilers that accept it.
 
 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=561&database=gcc

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