[cfe-commits] Correction to equality comparisons

David Majnemer david.majnemer at gmail.com
Thu Jul 2 11:18:52 PDT 2009


You are correct, this should stay. The attached patch should address this.

On Wed, Jul 1, 2009 at 6:22 PM, Eli Friedman<eli.friedman at gmail.com> wrote:
> On Wed, Jul 1, 2009 at 3:21 PM, David Majnemer<david.majnemer at gmail.com> wrote:
>> I misread the rules in 6.5.9 which caused false diagnostic messages.
>> The attached patch should correct this issue and also includes updated
>> test cases.
>
> @@ -27,5 +29,10 @@
>   return a > b; // expected-warning {{ordered comparison of function pointers}}
>   return function_pointers > function_pointers; // expected-warning
> {{ordered comparison of function pointers}}
>   return a == (void *) 0;
> -  return a == (void *) 1; // expected-warning {{comparison of
> distinct pointer types}}
> +  return a == (void *) 1;
>
> This warning was correct the way it was.
>
> -Eli
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fixed_bug_4175.patch
Type: application/octet-stream
Size: 2238 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20090702/065451f6/attachment.obj>


More information about the cfe-commits mailing list