This is the mail archive of the gcc-patches@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++: Restoring -Wno-pmf-conversions


>>>>> Mark Mitchell <mark@codesourcery.com> writes:

 > Can you explain what's going on in the patch a little?  It looks
 > plausible, but I couldn't quite see why you did what you did.

He shifted the "return error_mark_node;" into the error case.

 > But, I'm not sure we should *encourage* people to depend on this
 > feature.  On the other hand, as such things go, it's got reasonably
 > decent semantics.

That's the way I look at it.  Our customer does this so that they can cache
the function pointer extracted from the PMF so calls go faster; this seems
like a reasonable thing to want to do (as long as methods have the same
calling convention as normal functions), and reasonable syntax for it.  It
could also be useful in debugging output.

 > But, since you can only do it with pointer-to-member *constants*, it's
 > not really very useful; it seems to me it would be more useful if you
 > could use it with arbitrary pointer-to-member expressions.

You can.  That's what the documentation already there talks about doing.

The patch is OK.

Jason


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