Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/gcc.dg/pr68412-2.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 /* PR c/68412 */ |
2 /* { dg-do compile } */ | |
3 /* { dg-options "-Wall -Wextra" } */ | |
4 | |
5 int | |
6 fn1 (int i) | |
7 { | |
8 return ({ i; }) == ({ i; }); /* { dg-warning "self-comparison always evaluates to true" } */ | |
9 } | |
10 | |
11 int | |
12 fn2 (int i) | |
13 { | |
14 return ({ i + 1; }) != ({ i + 1; }); /* { dg-warning "self-comparison always evaluates to false" } */ | |
15 } |