Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/c-c++-common/Wduplicated-branches-3.c @ 158:494b0b89df80 default tip
...
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 25 May 2020 18:13:55 +0900 |
parents | 04ced10e8804 |
children |
line wrap: on
line source
/* PR c/64279 */ /* { dg-do compile } */ /* { dg-options "-Wduplicated-branches" } */ extern int *g; void f (short int i) { if (i == 0) /* { dg-warning "this condition has identical branches" } */ *g = (int) i; else *g = (int) i; if (i == 1) *g = (unsigned char) i; else *g = (signed char) i; }