aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/expr/ptr-comp3.C
blob: e1bc3c56d4d5ee9bf9ac58b1b520a81bc26cdda5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// DR 1512
// PR c++/87699
// { dg-do compile { target c++11 } }
// { dg-options "-Wall -Wextra -pedantic-errors" }

/* Comparisons between pointer types with different cv-quals are now OK.  */

void
f (int **p1, const int **p2)
{
   if (p1 == p2) { }
   if (p1 != p2) { }
   if (p2 == p1) { }
   if (p2 != p1) { }
}