Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/gcc.dg/pr60087.c @ 144:8f4e72ab4e11
fix segmentation fault caused by nothing next cur_op to end
author | Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 23 Dec 2018 21:23:56 +0900 |
parents | 04ced10e8804 |
children | 1830386684a0 |
line wrap: on
line source
/* PR c/60087 */ /* { dg-do compile } */ /* { dg-options "-Wsign-compare" } */ void foo (unsigned int ui, int i) { const unsigned char uc = 0; _Bool b; b = 0 != ~uc; /* { dg-warning "9:promoted ~unsigned is always non-zero" } */ b = 2 != ~uc; /* { dg-warning "9:comparison of promoted ~unsigned with constant" } */ b = uc == ~uc; /* { dg-warning "10:comparison of promoted ~unsigned with unsigned" } */ b = i == ui; /* { dg-warning "9:comparison of integer expressions of different signedness" } */ }