This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C++ PATCH] Fix bug 827
- To: Nathan Sidwell <nathan at codesourcery dot com>
- Subject: Re: [C++ PATCH] Fix bug 827
- From: Jason Merrill <jason at redhat dot com>
- Date: 27 Nov 2000 16:51:59 +0000
- Cc: gcc-patches at gcc dot gnu dot org
- References: <3A224C47.688B5963@codesourcery.com>
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