Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/gcc.dg/Wtype-limits2.c @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
rev | line source |
---|---|
111 | 1 /* { dg-do compile } */ |
2 /* { dg-options "-Wtype-limits" } */ | |
3 /* { dg-require-effective-target sync_char_short } */ | |
4 | |
5 #include <stdatomic.h> | |
6 | |
7 unsigned foo (unsigned char *x) | |
8 { | |
9 if (atomic_load (x) > 1000) /* { dg-warning "comparison is always false due to limited range of data type" } */ | |
10 return 0; | |
11 return 1; | |
12 } |