Mercurial > hg > CbC > CbC_gcc
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 |
rev | line source |
---|---|
111 | 1 // { dg-do assemble } |
2 // Here is a simple one. GCC correctly gives errors for this code when the | |
3 // - -pedantic-errors option is used, whereas g++ doesn't. | |
4 | |
5 | |
6 int (*p1)[3]; | |
7 int (*p2)[5]; | |
8 | |
9 void | |
10 test () | |
11 { | |
145 | 12 p1 == p2; // { dg-error "6:comparison between distinct pointer types" } comparison.* |
13 p1 > p2; // { dg-error "6:comparison between distinct pointer types" } comparison.* | |
111 | 14 } |