impint.C: New test.
authorNathan Sidwell <nathan@codesourcery.com>
Sun, 5 Mar 2000 10:23:46 +0000 (10:23 +0000)
committerNathan Sidwell <nathan@gcc.gnu.org>
Sun, 5 Mar 2000 10:23:46 +0000 (10:23 +0000)
* g++.old-deja/g++.warn/impint.C: New test.
* g++.old-deja/g++.martin/sts_vectini.C: Add -w option.
* g++.old-deja/g++.pt/explicit10.C: Specify -w option.
* g++.old-deja/g++.pt/explicit12.C: Likewise.
* g++.old-deja/g++.pt/explicit13.C: Likewise.
* g++.old-deja/g++.pt/explicit17.C: Likewise.
* g++.old-deja/g++.pt/explicit18.C: Likewise.
* g++.old-deja/g++.pt/explicit19.C: Likewise.
* g++.old-deja/g++.pt/explicit23.C: Likewise.
* g++.old-deja/g++.pt/explicit31.C: Likewise.
* g++.old-deja/g++.pt/explicit35.C: Likewise.
* g++.old-deja/g++.pt/explicit6.C: Likewise.
* g++.old-deja/g++.pt/memclass7.C: Likewise.

From-SVN: r32342

14 files changed:
gcc/testsuite/ChangeLog
gcc/testsuite/g++.old-deja/g++.martin/sts_vectini.C
gcc/testsuite/g++.old-deja/g++.pt/explicit10.C
gcc/testsuite/g++.old-deja/g++.pt/explicit12.C
gcc/testsuite/g++.old-deja/g++.pt/explicit13.C
gcc/testsuite/g++.old-deja/g++.pt/explicit17.C
gcc/testsuite/g++.old-deja/g++.pt/explicit18.C
gcc/testsuite/g++.old-deja/g++.pt/explicit19.C
gcc/testsuite/g++.old-deja/g++.pt/explicit23.C
gcc/testsuite/g++.old-deja/g++.pt/explicit31.C
gcc/testsuite/g++.old-deja/g++.pt/explicit35.C
gcc/testsuite/g++.old-deja/g++.pt/explicit6.C
gcc/testsuite/g++.old-deja/g++.pt/memclass7.C
gcc/testsuite/g++.old-deja/g++.warn/impint.C [new file with mode: 0644]

index f51ec94bf1553106721eec71b38ab26e538a81b2..b13fcbc7d457c50e302a1960f06492696f20338d 100644 (file)
@@ -1,3 +1,19 @@
+2000-03-05  Nathan Sidwell  <nathan@codesourcery.com>
+
+       * g++.old-deja/g++.warn/impint.C: New test.
+       * g++.old-deja/g++.martin/sts_vectini.C: Add -w option.
+       * g++.old-deja/g++.pt/explicit10.C: Specify -w option.
+       * g++.old-deja/g++.pt/explicit12.C: Likewise.
+       * g++.old-deja/g++.pt/explicit13.C: Likewise.
+       * g++.old-deja/g++.pt/explicit17.C: Likewise.
+       * g++.old-deja/g++.pt/explicit18.C: Likewise.
+       * g++.old-deja/g++.pt/explicit19.C: Likewise.
+       * g++.old-deja/g++.pt/explicit23.C: Likewise.
+       * g++.old-deja/g++.pt/explicit31.C: Likewise.
+       * g++.old-deja/g++.pt/explicit35.C: Likewise.
+       * g++.old-deja/g++.pt/explicit6.C: Likewise.
+       * g++.old-deja/g++.pt/memclass7.C: Likewise.
+
 2000-03-01  Zack Weinberg  <zack@wolery.cumb.org>
 
        * gcc.dg/cpp-redef.c: New test.
index 56f7a1c6a5e6de37711cee0a5dda3ab6e06abf82..f4701571385f15f231b32f158656adeb3ac40bc6 100644 (file)
@@ -1,4 +1,4 @@
-// Special g++ Options: -O2
+// Special g++ Options: -O2 -w
 // egcs-bugs 1999-02-22 14:24 Stefan Schwarzer
 // sts@ica1.uni-stuttgart.de
 // optimizer problem in egcs <= 1.1.1
index d90b8d051973b9514f3c0b16e5d0d1befc256452..7f38f72c5b772e213cd36a525b6148049c0fa133 100644 (file)
@@ -1,5 +1,6 @@
 // Build don't link:
 // GROUPS passed templates
+// Special g++ Options: -ansi -pedantic-errors -w
 template <class T>
 void foo(T t);
 
index 0defb196116e475b8ace8bfea6932547a17c6b9c..820da3d62bc519a9fd6a45449365e448a81395ae 100644 (file)
@@ -1,4 +1,5 @@
 // Build don't run:
+// Special g++ Options: -ansi -pedantic-errors -w
 // GROUPS passed templates
 template <class U>
 struct S 
index fbb790130385c6d578dd2c9310a8c5916309ceae..939158605e88da8ef97905215b1c9d38862d5c48 100644 (file)
@@ -1,5 +1,6 @@
 // Build don't run:
 // GROUPS passed templates
+// Special g++ Options: -ansi -pedantic-errors -w
 
 template <class U>
 struct S 
index 8e8688df32190b277de8bc7672954cc27d955251..4abd17e49391eace104258ec98daf0642be0e6d6 100644 (file)
@@ -1,5 +1,6 @@
 // Build don't link:
 // GROUPS passed templates
+// Special g++ Options: -ansi -pedantic-errors -w
 template <class T, class U>
 void foo(U u, T t);
 
index 20c4b75d11e3b5826a8d83153988dbba60fb39f4..b63fc3f2c62031668373dd74f3436d1acdd69e53 100644 (file)
@@ -1,5 +1,6 @@
 // Build don't run:
 // GROUPS passed templates
+// Special g++ Options: -ansi -pedantic-errors -w
 template <class T>
 int foo(T t) { return 0; }
 
index b209bbe8672a5fad2f7c0b6095e777315ed4c03e..3b29403e60b9c7dc1e25b47974fe76cc5090b61e 100644 (file)
@@ -1,5 +1,6 @@
 // Build don't run:
 // GROUPS passed templates
+// Special g++ Options: -ansi -pedantic-errors -w
 template <class T>
 int foo(T t);
 
index cdffb15bc66a061be4a75eed0db33de31a93ebd4..85fab0055d2297450dc88d10df7eea03a39555ab 100644 (file)
@@ -1,5 +1,6 @@
 // Build don't run:
 // GROUPS passed templates
+// Special g++ Options: -ansi -pedantic-errors -w
 template <class T>
 int foo(T t) { return 1; }
 
index 61190f7f5f19f459da77f5dde6110a88a63f09a9..900ba1157e54f5e2f73d23ef2122ab9b2fb1fd91 100644 (file)
@@ -1,5 +1,6 @@
 // Build don't run:
 // GROUPS passed templates
+// Special g++ Options: -ansi -pedantic-errors -w
 template <class T>
 struct S
 {
index c9282632aa182938a97cd0433ba362cf09577004..e39a27bc501e080f5c0a74cb7a09fa0d985a06a1 100644 (file)
@@ -1,5 +1,6 @@
 // Build don't run:
 // GROUPS passed templates
+// Special g++ Options: -ansi -pedantic-errors -w
 struct S 
 {
   template <class T>
index 1ee7751b555865b01ed57212b12ede3ab5f1f35f..a56c213d0a9a8b835a88378a69d274fd268749f0 100644 (file)
@@ -1,5 +1,6 @@
 // Build don't run:
 // GROUPS passed templates
+// Special g++ Options: -ansi -pedantic-errors -w
 template <class T>
 int foo(T t);
 
index 1a5cabe67a158e11b3e1afde45df101d2938efe3..d356a4ed55a59fd34a4c5fc72d499c770cdfdbea 100644 (file)
@@ -1,3 +1,4 @@
+// Special g++ Options: -ansi -pedantic-errors -w
 struct S 
 {
   template <class U>
diff --git a/gcc/testsuite/g++.old-deja/g++.warn/impint.C b/gcc/testsuite/g++.old-deja/g++.warn/impint.C
new file mode 100644 (file)
index 0000000..b253f3f
--- /dev/null
@@ -0,0 +1,57 @@
+// Build don't link:
+
+// Copyright (C) 2000 Free Software Foundation, Inc.
+// Contributed by Nathan Sidwell 24 Feb 2000 <nathan@codesourcery.com>
+
+// derived from a bug report by Johan Kuipers <j.kuipers@chello.nl>
+// initialization to 'int' from to 'double' We expect consistent warnings
+// whenever a float is implicitly truncated to int
+
+struct X
+{
+  X (int);
+  X (int, int);
+};
+
+void foo (int);
+void wibble (int);
+void wibble (int, int);
+void punk (int = 3.5);
+void rock ();
+void rock (int, int = 3.5);
+
+void fn ()
+{
+  X x1(3.5);        // WARNING - double to int
+  X x2(3.5f);       // WARNING - float to int
+  X x3(1, 3.5);     // WARNING - double to int
+  X x4(1, 3.5f);    // WARNING - float to int
+  X x5(3.5, 1);     // WARNING - double to int
+  X x6(3.5f, 1);    // WARNING - float to int
+
+  X y1 = 3.5;       // WARNING - double to int
+  X y2 = 3.5f;      // WARNING - float to int
+
+  int j1 (3.5);     // WARNING - double to int
+  int j2 (3.5f);    // WARNING - float to int
+
+  int k1 = 3.5;     // WARNING - double to int
+  int k2 = 3.5f;    // WARNING - float to int
+  
+  j1 = 3.5;         // WARNING - double to int
+  j2 = 3.5f;        // WARNING - float to int
+  
+  foo (3.5);        // WARNING - double to int
+  foo (3.5f);       // WARNING - float to int
+  
+  wibble (3.5);     // WARNING - double to int
+  wibble (3.5f);    // WARNING - float to int
+  wibble (1, 3.5);  // WARNING - double to int
+  wibble (1, 3.5f); // WARNING - float to int
+  wibble (3.5, 1);  // WARNING - double to int
+  wibble (3.5f, 1); // WARNING - float to int
+  
+  punk ();          // WARNING - double to int
+  rock (1);         // WARNING - double to int
+}
+