This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH for crash with incomplete types
>>>>> "Jason" == Jason Merrill <jason@cygnus.com> writes:
>>>>> Mark Mitchell <mark@markmitchell.com> writes:
>> Here's a patch for the crash on the enclosed testcase. Jason,
>> OK?
Jason> No. I don't want the new overloading code to use the old
Jason> overloading code, such as convert_arguments. The new code
Jason> is much cleaner, and I'd like to keep it that way. Simple
I don't quite get it. The code in build_over_call and
convert_arguments was almost line-for-line identical, but the "old
code" did a check to make sure that the arguments weren't of
incomplete type, which the "new code" did not. Would you prefer that
I copy this check into the new code, thereby increasing the
duplication? Or is there some fix we could make to convert_arguments
to make it cleaner?
This code isn't really doing overload resolution, BTW; it's supposed
to solve the general problem of "I've decided to call this function
with these arguments. Are there any conversions I should do?"
I'm not trying to be contentious; I'm all for cleanliness! I'm just
not seeing how it's cleaner to have the same code duplicated in both
places. I'd be happy to share the code in a different way, or in a
different place, as you see fit.
Jason> Jason
--
Mark Mitchell mark@markmitchell.com
Mark Mitchell Consulting http://www.markmitchell.com