This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: C++ PATCH: static_cast regression
- To: gcc-patches at gcc dot gnu dot org
- Subject: Re: C++ PATCH: static_cast regression
- From: "Martin v. Loewis" <martin at loewis dot home dot cs dot tu-berlin dot de>
- Date: Wed, 5 Jan 2000 01:20:27 +0100
- CC: mark at codesourcery dot com, nathan at cs dot bris dot ac dot uk
> But I'm uncomfortable with the (widespread in g++) practice of
> coding up routines to do things that the standard specifies, but in
> a way that bears no resemblance to *what* the standard specifies.
I believe the cause is not only that the original authors of such code
were very smart people (which they certainly were), but that there was
no thorough description of how static_cast and such things should work
at the time the features were implemented.
The C++ standard has a very high quality (I'm always impressed), which
was not found in earlier descriptions of the language. So compiler
authors had to come up with their own algorithms that represents the
"intuition" of the C++ users and language designers.
It is really nobodies fault that the final algorithm differs from what
g++ does. If there is an opportunity, rewriting such algorithms from
scratch is often the right thing, if time permits.
Regards,
Martin