Mainly changes to diagnostic message wording.  Also switched the order on two types passed to a diagnostic.<br><br><div class="gmail_quote">On Mon, Nov 21, 2011 at 4:02 PM, Richard Smith <span dir="ltr"><<a href="mailto:richard@metafoo.co.uk">richard@metafoo.co.uk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">On Mon, November 21, 2011 22:44, Richard Trieu wrote:<br>
> Ping.<br>
<br>
I've added a few more comments on the code review site.<br>
<br>
Thanks,<br>
Richard<br>
<div class="HOEnZb"><div class="h5"><br>
> On Thu, Nov 17, 2011 at 12:45 PM, Matthieu Monrocq <<br>
> <a href="mailto:matthieu.monrocq@gmail.com">matthieu.monrocq@gmail.com</a>> wrote:<br>
><br>
>><br>
>><br>
>> Le 17 novembre 2011 01:14, Richard Trieu <<a href="mailto:rtrieu@google.com">rtrieu@google.com</a>> a écrit :<br>
>><br>
>><br>
>> On Wed, Nov 16, 2011 at 12:06 PM, Matthieu Monrocq <<br>
>><br>
>>> <a href="mailto:matthieu.monrocq@gmail.com">matthieu.monrocq@gmail.com</a>> wrote:<br>
>>><br>
>>>><br>
>>>><br>
>>>> Le 15 novembre 2011 21:23, Richard Trieu <<a href="mailto:rtrieu@google.com">rtrieu@google.com</a>> a écrit :<br>
>>>><br>
>>>><br>
>>>> New feature that will print additional information when non-matching<br>
>>>><br>
>>>>> function pointers are used.  This will help users more easily<br>
>>>>> distinguish why the function pointers do not match.  The points of<br>
>>>>> difference that will be noted are:<br>
>>>>><br>
>>>>> Different number of parameters<br>
>>>>> Different parameter type<br>
>>>>> Different return type<br>
>>>>> Different function qualifiers<br>
>>>>><br>
>>>>><br>
>>>>> For instance, code like this:<br>
>>>>><br>
>>>>><br>
>>>>> double foo(int x) {return 0;}; double (*bar)(int, int) = &foo;<br>
>>>>><br>
>>>>> Will get this error message:<br>
>>>>><br>
>>>>><br>
>>>>> function-mismatch.cc:2:10: error: cannot initialize a variable of<br>
>>>>> type 'double (*)(int, int)' with an rvalue of type 'double (*)(int)'<br>
>>>>> because of different number of parameters (expected 2 but has 1) double<br>
>>>>> (*bar)(int, int) = &foo;<br>
>>>>> ^                ~~~~<br>
>>>>><br>
>>>>><br>
>>>>> Patch is attached and also available at<br>
>>>>> <a href="http://codereview.appspot.com/5369119/" target="_blank">http://codereview.appspot.com/5369119/</a><br>
>>>>><br>
>>>>><br>
>>>>><br>
>>>>> Nice!<br>
>>>>><br>
>>>><br>
>>>> Do you plan on adding something for a difference of class (for pointer<br>
>>>> to member functions) ? Or perhaps that it already exists...<br>
>>>><br>
>>>> -- Matthieu<br>
>>>><br>
>>>><br>
>>>> Added a bit to the diagnostic message to say if they are from different<br>
>>>><br>
>>> classes, as well as changes in response to comments Richard Smith made on<br>
>>>  <a href="http://codereview.appspot.com/5369119/" target="_blank">http://codereview.appspot.com/5369119/</a><br>
>>><br>
>><br>
>><br>
>> Thanks!<br>
>><br>
>><br>
>> -- Matthieu<br>
>><br>
>><br>
><br>
<br>
</div></div></blockquote></div><br>