URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Subversion Repositories openrisc_me
[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [fixed-point/] [int-warning.c] - Rev 334
Go to most recent revision | Compare with Previous | Blame | View Log
/* { dg-do compile } */ /* { dg-options "-std=gnu99 -O2" } */ /* N1169 Conversion from fixed-point to integer. Test if GCC warns when overflow or underflow. */ signed char sc; unsigned char uc; void test() { sc = 500k; /* { dg-warning "overflow in implicit constant conversion" } */ sc = -500k; /* { dg-warning "overflow in implicit constant conversion" } */ sc = 500lk; /* { dg-warning "overflow in implicit constant conversion" } */ sc = -500lk; /* { dg-warning "overflow in implicit constant conversion" } */ sc = 500llk; /* { dg-warning "overflow in implicit constant conversion" } */ sc = -500llk; /* { dg-warning "overflow in implicit constant conversion" } */ uc = 500k; /* { dg-warning "overflow in implicit constant conversion" } */ uc = -500k; /* { dg-warning "overflow in implicit constant conversion" } */ uc = 500lk; /* { dg-warning "overflow in implicit constant conversion" } */ uc = -500lk; /* { dg-warning "overflow in implicit constant conversion" } */ uc = 500llk; /* { dg-warning "overflow in implicit constant conversion" } */ uc = -500llk; /* { dg-warning "overflow in implicit constant conversion" } */ }
Go to most recent revision | Compare with Previous | Blame | View Log