we now correctly emit:

unused-expr.c:8:6: warning: comparison of distinct pointer types ('int volatile *' and 'int *')
  VP == P;
  ~~ ^  ~

llvm-svn: 41210
This commit is contained in:
Chris Lattner 2007-08-21 01:19:46 +00:00
parent 913849b5df
commit 91b9a4c8c3
1 changed files with 2 additions and 1 deletions

View 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.