comparison gcc/testsuite/g++.dg/expr/ptr-comp3.C @ 152:2b5abeee2509

update gcc11
author anatofuz
date Mon, 25 May 2020 07:50:57 +0900
parents
children
comparison
equal deleted inserted replaced
145:1830386684a0 152:2b5abeee2509
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 }