]> granicus.if.org Git - clang/commitdiff
we now correctly emit:
authorChris Lattner <sabre@nondot.org>
Tue, 21 Aug 2007 01:19:46 +0000 (01:19 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 21 Aug 2007 01:19:46 +0000 (01:19 +0000)
unused-expr.c:8:6: warning: comparison of distinct pointer types ('int volatile *' and 'int *')
  VP == P;
  ~~ ^  ~

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41210 91177308-0d34-0410-b5e6-96231b3b80d8

test/Sema/unused-expr.c

index 667f286f510b9cccccedfc69b8841d1b9f225d00..245a736f58e98425e9b3cf291c7f9471c0483e2a 100644 (file)
@@ -5,7 +5,8 @@ int foo(int X, int Y);
 void bar(volatile int *VP, int *P, int A,
          _Complex double C, volatile _Complex double VC) {
   
-  VP == P;             // expected-warning {{expression result unused}}
+  VP == P;             // expected-warning {{expression result unused}} \
+                          expected-warning {{comparison}}
   (void)A;             // expected-warning {{expression result unused}}
   (void)foo(1,2);      // no warning.