summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/warn/Wconversion1.C
blob: 48e319ad66f0db201f081deb041ce00adbb9e108 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// { dg-options "-fsigned-char -Wsign-conversion" }

char c1 = 1024; // { dg-warning "overflow" }
char c2 = char(1024);
char c3 = (char) 1024;
char c4 = static_cast<char>(1024);
 
unsigned char uc1 = -129; // { dg-warning "unsigned" }

bool b1 = -3;

int i1 = 0x80000000; // { dg-warning "conversion" }