3 // Copyright (C) 2000 Free Software Foundation, Inc.
4 // Contributed by Nathan Sidwell 6 Mar 2000 <nathan@codesourcery.com>
6 // initialization to 'int' from to 'double' We expect consistent warnings
7 // whenever a float is implicitly truncated to int, make sure references
8 // don't confuse us, as Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at> found out.
13 X (int const &, int const &);
16 void foo (int const &);
17 void wibble (int const &);
18 void wibble (int const &, int const &);
19 void punk (int const & = 3.5f); // { dg-warning "" } in passing
21 void rock (int const &, int const & = 3.5f); // { dg-warning "" } in passing
25 X x2(3.5f); // { dg-warning "" } float to int
26 X x4(1, 3.5f); // { dg-warning "" } float to int
27 X x6(3.5f, 1); // { dg-warning "" } float to int
29 X y2 = 3.5f; // { dg-warning "" } float to int
31 int j2 (3.5f); // { dg-warning "" } float to int
33 int k2 = 3.5f; // { dg-warning "" } float to int
35 j2 = 3.5f; // { dg-warning "" } float to int
37 foo (3.5f); // { dg-warning "" } float to int
39 wibble (3.5f); // { dg-warning "" } float to int
40 wibble (1, 3.5f); // { dg-warning "" } float to int
41 wibble (3.5f, 1); // { dg-warning "" } float to int
43 punk (); // { dg-warning "" } float to int
44 rock (1); // { dg-warning "" } float to int
47 // and make sure we really know when something's unsigned