Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/gcc.dg/switch-warn-2.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 |
line wrap: on
line source
/* This should not warn about the case label being out of range. */ /* { dg-do run } */ /* { dg-options "-O0" } */ extern void abort (void); extern void exit (int); int foo (unsigned int i) { switch (i) { case 123456123456ULL: /* { dg-warning "conversion from .long long unsigned int. to .unsigned int. changes value" } */ return 0; default: return 3; } } int main (void) { if (foo (10) != 3) abort (); exit (0); }