2 // { dg-do compile { target c++11 } }
3 // { dg-options "-Wnarrowing -Wno-overflow" }
7 constexpr operator int() { return __INT_MAX__; }
10 int f() { return __INT_MAX__; }
12 signed char a { __INT_MAX__ }; // { dg-error "narrowing conversion" }
13 signed char b { f() }; // { dg-warning "narrowing conversion" }
14 signed char c { X{} }; // { dg-error "narrowing conversion" }
16 signed char ar[] { __INT_MAX__ }; // { dg-error "narrowing conversion" }
17 signed char br[] { f() }; // { dg-warning "narrowing conversion" }
18 signed char cr[] { X{} }; // { dg-error "narrowing conversion" }