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: static_cast regression


> 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

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