This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: C++ PATCH: perform_implicit_conversion
>>>>> "Nathan" == Nathan Sidwell <nathan@acm.org> writes:
Nathan> That would be optimizing the compiler on the (hopefully)
Nathan> rare failure path to the detriment of the frequent success
Nathan> path. Ok, not by much. implicit_conversion copes with an
Nathan> error_mark_node and returns NULL. (I should have said
Nathan> that)
Good point. But, we're so far from having any idea where the
performance hot spots are in the C++ front-end (and I bet you they're
not in implicit_conversion), that I don't think we need to worry about
this. I think simple code is the way to the go, until the compiler is
considerably more correct than it is now. Most routines should just
return error_mark_node when confronted with it; that will cause to
quickly unwind to the next statement and keep going sensibly.
Nathan> Would you still prefer early checking for error_mark_node?
Yes.
--
Mark Mitchell mark@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com