Debian Codegraph @

gcc/testsuite/g++.dg/expr/ptr-comp3.C

raw
1 // DR 1512
2 // PR c++/87699
3 // { dg-do compile { target c++11 } }
4 // { dg-options "-Wall -Wextra -pedantic-errors" }
5
6 /* Comparisons between pointer types with different cv-quals are now OK. */
7
8 void
9 f (int **p1, const int **p2)
10 {
11 if (p1 == p2) { }
12 if (p1 != p2) { }
13 if (p2 == p1) { }
14 if (p2 != p1) { }
15 }