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++ PATCH] Fix bug 827


This patch is fundamentally wrong.  The code in question is a g++
extension, and has nothing to do with reinterpret_cast.  The testcase
is ill-formed.  I'd much rather see this bug fixed by removing the
extension.

Yes, reinterpret_cast allows us to convert between arbitrary pointers
to member functions, but the whole point of reinterpret_cast is that
no adjustment should be done in the conversion.  And, indeed,
build_reinterpret_cast never calls cp_convert_to_pointer; the only way
to reach the old warning is with an old-style cast.

Just tear it out.

Jason

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