Debian Codegraph @

gcc/testsuite/g++.dg/cpp0x/Wnarrowing5.C

raw
1 // PR c++/85045
2 // { dg-do compile { target c++11 } }
3
4 typedef struct tt {
5 unsigned short h;
6 } tt;
7
8 void mainScreen(float a)
9 {
10 tt numlrect = {int(100/a)}; // { dg-error "narrowing conversion" }
11 }