From: Chris Lattner Date: Tue, 21 Aug 2007 01:19:46 +0000 (+0000) Subject: we now correctly emit: X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2b8bac52b8c5690c7a6525c95feefe29bb12178d;p=clang we now correctly emit: 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 --- diff --git a/test/Sema/unused-expr.c b/test/Sema/unused-expr.c index 667f286f51..245a736f58 100644 --- a/test/Sema/unused-expr.c +++ b/test/Sema/unused-expr.c @@ -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.