[cfe-commits] Correction to equality comparisons

Eli Friedman eli.friedman at gmail.com
Wed Jul 1 18:22:04 PDT 2009


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



More information about the cfe-commits mailing list