Exemplo n.º 1
0
void test7(short v) {
  takes_char(v); // expected-warning {{implicit conversion loses integer precision}}
  takes_short(v);
  takes_int(v);
  takes_long(v);
  takes_longlong(v);
  takes_float(v);
  takes_double(v);
  takes_longdouble(v);
}
Exemplo n.º 2
0
void test13(long double v) {
  takes_char(v); // expected-warning {{implicit conversion turns floating-point number into integer}}
  takes_short(v); // expected-warning {{implicit conversion turns floating-point number into integer}}
  takes_int(v); // expected-warning {{implicit conversion turns floating-point number into integer}}
  takes_long(v); // expected-warning {{implicit conversion turns floating-point number into integer}}
  takes_longlong(v); // expected-warning {{implicit conversion turns floating-point number into integer}}
  takes_float(v); // expected-warning {{implicit conversion loses floating-point precision}}
  takes_double(v); // expected-warning {{implicit conversion loses floating-point precision}}
  takes_longdouble(v);
}
Exemplo n.º 3
0
void test6(char v) {
  takes_char(v);
  takes_short(v);
  takes_int(v);
  takes_long(v);
  takes_longlong(v);
  takes_float(v);
  takes_double(v);
  takes_longdouble(v);
}
Exemplo n.º 4
0
 void function_call() {
   void takes_int(int);
   takes_int({1}); // expected-warning {{braces around scalar init}}
 }