annotate gcc/testsuite/g++.old-deja/g++.rfg/00321_01-.C @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 04ced10e8804
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 // { dg-do assemble }
kono
parents:
diff changeset
2 // Here is a simple one. GCC correctly gives errors for this code when the
kono
parents:
diff changeset
3 // - -pedantic-errors option is used, whereas g++ doesn't.
kono
parents:
diff changeset
4
kono
parents:
diff changeset
5
kono
parents:
diff changeset
6 int (*p1)[3];
kono
parents:
diff changeset
7 int (*p2)[5];
kono
parents:
diff changeset
8
kono
parents:
diff changeset
9 void
kono
parents:
diff changeset
10 test ()
kono
parents:
diff changeset
11 {
145
1830386684a0 gcc-9.2.0
anatofuz
parents: 111
diff changeset
12 p1 == p2; // { dg-error "6:comparison between distinct pointer types" } comparison.*
1830386684a0 gcc-9.2.0
anatofuz
parents: 111
diff changeset
13 p1 > p2; // { dg-error "6:comparison between distinct pointer types" } comparison.*
111
kono
parents:
diff changeset
14 }