aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/testsuite/ChangeLog16
-rw-r--r--gcc/testsuite/g++.old-deja/g++.martin/sts_vectini.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/explicit10.C1
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/explicit12.C1
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/explicit13.C1
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/explicit17.C1
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/explicit18.C1
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/explicit19.C1
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/explicit23.C1
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/explicit31.C1
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/explicit35.C1
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/explicit6.C1
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/memclass7.C1
-rw-r--r--gcc/testsuite/g++.old-deja/g++.warn/impint.C57
14 files changed, 85 insertions, 1 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index f51ec94..b13fcbc 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -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.
diff --git a/gcc/testsuite/g++.old-deja/g++.martin/sts_vectini.C b/gcc/testsuite/g++.old-deja/g++.martin/sts_vectini.C
index 56f7a1c..f470157 100644
--- a/gcc/testsuite/g++.old-deja/g++.martin/sts_vectini.C
+++ b/gcc/testsuite/g++.old-deja/g++.martin/sts_vectini.C
@@ -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
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/explicit10.C b/gcc/testsuite/g++.old-deja/g++.pt/explicit10.C
index d90b8d0..7f38f72 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/explicit10.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/explicit10.C
@@ -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);
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/explicit12.C b/gcc/testsuite/g++.old-deja/g++.pt/explicit12.C
index 0defb19..820da3d 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/explicit12.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/explicit12.C
@@ -1,4 +1,5 @@
// Build don't run:
+// Special g++ Options: -ansi -pedantic-errors -w
// GROUPS passed templates
template <class U>
struct S
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/explicit13.C b/gcc/testsuite/g++.old-deja/g++.pt/explicit13.C
index fbb7901..9391586 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/explicit13.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/explicit13.C
@@ -1,5 +1,6 @@
// Build don't run:
// GROUPS passed templates
+// Special g++ Options: -ansi -pedantic-errors -w
template <class U>
struct S
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/explicit17.C b/gcc/testsuite/g++.old-deja/g++.pt/explicit17.C
index 8e8688d..4abd17e 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/explicit17.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/explicit17.C
@@ -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);
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/explicit18.C b/gcc/testsuite/g++.old-deja/g++.pt/explicit18.C
index 20c4b75..b63fc3f 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/explicit18.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/explicit18.C
@@ -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; }
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/explicit19.C b/gcc/testsuite/g++.old-deja/g++.pt/explicit19.C
index b209bbe..3b29403 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/explicit19.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/explicit19.C
@@ -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);
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/explicit23.C b/gcc/testsuite/g++.old-deja/g++.pt/explicit23.C
index cdffb15..85fab00 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/explicit23.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/explicit23.C
@@ -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; }
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/explicit31.C b/gcc/testsuite/g++.old-deja/g++.pt/explicit31.C
index 61190f7..900ba115 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/explicit31.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/explicit31.C
@@ -1,5 +1,6 @@
// Build don't run:
// GROUPS passed templates
+// Special g++ Options: -ansi -pedantic-errors -w
template <class T>
struct S
{
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/explicit35.C b/gcc/testsuite/g++.old-deja/g++.pt/explicit35.C
index c928263..e39a27b 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/explicit35.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/explicit35.C
@@ -1,5 +1,6 @@
// Build don't run:
// GROUPS passed templates
+// Special g++ Options: -ansi -pedantic-errors -w
struct S
{
template <class T>
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/explicit6.C b/gcc/testsuite/g++.old-deja/g++.pt/explicit6.C
index 1ee7751..a56c213 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/explicit6.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/explicit6.C
@@ -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);
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/memclass7.C b/gcc/testsuite/g++.old-deja/g++.pt/memclass7.C
index 1a5cabe..d356a4e 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/memclass7.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/memclass7.C
@@ -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
index 0000000..b253f3f
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.warn/impint.C
@@ -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
+}
+