summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/warn/conv4.C
blob: a15ef8bf1905920c00e783819de8b59db1d5c82f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// { dg-do compile }

// This file should compile cleanly by default and not warn on the conversions.
int func1(int i)
{
  return i;
}

int main()
{
  float f;
  long l;
  unsigned long ul;

  f = 1.5f;

  l = f;
  ul = -1;
  func1(f);

  return 0;
}