diff options
author | Jason Merrill <jason@gcc.gnu.org> | 2000-02-27 01:54:06 -0500 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2000-02-27 01:54:06 -0500 |
commit | 1ab83276edecdf4237e07a41301efa97bebc8726 (patch) | |
tree | 212da3799e5b63af82e9c13947df06074a0d8203 /gcc | |
parent | aa52c1ffad50ffe721a19a816f474c56958b1d3a (diff) | |
download | gcc-1ab83276edecdf4237e07a41301efa97bebc8726.zip gcc-1ab83276edecdf4237e07a41301efa97bebc8726.tar.gz gcc-1ab83276edecdf4237e07a41301efa97bebc8726.tar.bz2 |
update
From-SVN: r32213
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.benjamin/14687.C | 1 | ||||
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.benjamin/scope01.C | 4 | ||||
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.brendan/misc15.C | 4 | ||||
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.jason/template18.C | 2 | ||||
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.law/visibility26.C | 6 | ||||
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.other/lookup18.C | 23 | ||||
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.other/using2.C | 4 | ||||
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.other/using4.C | 2 | ||||
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.other/using6.C | 29 | ||||
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.pt/memtemp89.C | 5 |
10 files changed, 64 insertions, 16 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.benjamin/14687.C b/gcc/testsuite/g++.old-deja/g++.benjamin/14687.C index c2a9a99..6897fe9 100644 --- a/gcc/testsuite/g++.old-deja/g++.benjamin/14687.C +++ b/gcc/testsuite/g++.old-deja/g++.benjamin/14687.C @@ -1,6 +1,5 @@ // 981203 bkoz // g++/14687 -// excess errors test - XFAIL *-*-* #include <assert.h> unsigned int gtest; diff --git a/gcc/testsuite/g++.old-deja/g++.benjamin/scope01.C b/gcc/testsuite/g++.old-deja/g++.benjamin/scope01.C index a834f4f..582723a 100644 --- a/gcc/testsuite/g++.old-deja/g++.benjamin/scope01.C +++ b/gcc/testsuite/g++.old-deja/g++.benjamin/scope01.C @@ -19,8 +19,8 @@ class C : public A, public B {}; void foo() { // straight call C x; - x.A::ii = 5; - x.A::foo(x.A::ii); + x.A::ii = 5; // ERROR - L is ambiguous base + x.A::foo(x.A::ii); // ERROR - L is ambiguous base // 5.1 Primary expressions // p 8 diff --git a/gcc/testsuite/g++.old-deja/g++.brendan/misc15.C b/gcc/testsuite/g++.old-deja/g++.brendan/misc15.C index e4dd53e..30c4feb 100644 --- a/gcc/testsuite/g++.old-deja/g++.brendan/misc15.C +++ b/gcc/testsuite/g++.old-deja/g++.brendan/misc15.C @@ -1,6 +1,6 @@ // Build don't link: // GROUPS passed miscellaneous-bugs -// we shouldn't get any warnings or errors for this code + struct A { int aa; }; @@ -9,5 +9,5 @@ struct B : public A { struct C : public A { }; struct D : public C, public B { - void fun() { C::aa = 10; } + void fun() { C::aa = 10; } // ERROR - conversion to A is ambiguous }; diff --git a/gcc/testsuite/g++.old-deja/g++.jason/template18.C b/gcc/testsuite/g++.old-deja/g++.jason/template18.C index 38224bf..d736826 100644 --- a/gcc/testsuite/g++.old-deja/g++.jason/template18.C +++ b/gcc/testsuite/g++.old-deja/g++.jason/template18.C @@ -1,6 +1,6 @@ // GROUPS passed templates // Bug: g++ emits template instances when it shouldn't. -// Special g++ Options: -g -Wno-deprecated -fexternal-templates +// Special g++ Options: -g -O0 -Wno-deprecated -fexternal-templates // We mark this XFAIL because we can't test for expected linker errors. // If we get an XPASS for this testcase, that's a bug. diff --git a/gcc/testsuite/g++.old-deja/g++.law/visibility26.C b/gcc/testsuite/g++.old-deja/g++.law/visibility26.C index 54fc43e..ba1299d 100644 --- a/gcc/testsuite/g++.old-deja/g++.law/visibility26.C +++ b/gcc/testsuite/g++.old-deja/g++.law/visibility26.C @@ -13,6 +13,6 @@ class X { class Y : private X { public: - void f(int);// ERROR - because.* - X::f; // g++ 2.5.5 doesn't flag this misuse -};// ERROR - cannot adjust.* + void f(int); + X::f; // used to be an error; now equivalent to 'using X::f' +}; diff --git a/gcc/testsuite/g++.old-deja/g++.other/lookup18.C b/gcc/testsuite/g++.old-deja/g++.other/lookup18.C new file mode 100644 index 0000000..bec78f8 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.other/lookup18.C @@ -0,0 +1,23 @@ +// Test that referring to an ambiguous base in name lookup does not +// interfere with accessing the field, which is not ambiguous. + +// Build don't link: + +struct A { + int i; +}; +struct B: virtual A { }; +struct C: public B { }; +struct D: public B { }; +struct E: public C, public D { + void f (); +}; + +void E::f() { + B::i = 0; +} + +void f () { + E e; + e.B::i = 0; +} diff --git a/gcc/testsuite/g++.old-deja/g++.other/using2.C b/gcc/testsuite/g++.old-deja/g++.other/using2.C index 2924498..cb457bf 100644 --- a/gcc/testsuite/g++.old-deja/g++.other/using2.C +++ b/gcc/testsuite/g++.old-deja/g++.other/using2.C @@ -5,6 +5,6 @@ struct X{ struct Y:X{ void f(int); - void f(); // ERROR - conflict + void f(); using X::f; -}; // ERROR - +}; diff --git a/gcc/testsuite/g++.old-deja/g++.other/using4.C b/gcc/testsuite/g++.old-deja/g++.other/using4.C index 218ffe2..bb653e4 100644 --- a/gcc/testsuite/g++.old-deja/g++.other/using4.C +++ b/gcc/testsuite/g++.old-deja/g++.other/using4.C @@ -2,8 +2,6 @@ // Based on a testcase by Martin Bachtold <martinb@coyotesystems.com> -// excess errors test - XFAIL *-*-* - struct foo { void m(); }; diff --git a/gcc/testsuite/g++.old-deja/g++.other/using6.C b/gcc/testsuite/g++.old-deja/g++.other/using6.C new file mode 100644 index 0000000..40b21b5 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.other/using6.C @@ -0,0 +1,29 @@ +// Test of class-scope using-declaration for functions. + +#define assert(COND) if (!(COND)) return 1 + +struct A { + int f(int) { return 1; } + int f(char) { return 2; } +}; + +struct B { + int f(double) { return 3; } +}; + +struct C : public A, public B { + using A::f; + using B::f; + int f(char) { return 4; } + int f(C) { return 5; } +}; + +int main () +{ + C c; + + assert (c.f(1) == 1); + assert (c.f('a') == 4); + assert (c.f(2.0) == 3); + assert (c.f(c) == 5); +} diff --git a/gcc/testsuite/g++.old-deja/g++.pt/memtemp89.C b/gcc/testsuite/g++.old-deja/g++.pt/memtemp89.C index 7cc027a..768b374 100644 --- a/gcc/testsuite/g++.old-deja/g++.pt/memtemp89.C +++ b/gcc/testsuite/g++.old-deja/g++.pt/memtemp89.C @@ -1,5 +1,4 @@ // Build don't link: -// crash test - XFAIL *-*-* // by Paul Burchard <burchard@pobox.com>, Level Set Systems, Inc. // Copyright (C) 1999 Free Software Foundation @@ -11,7 +10,7 @@ class Q { }; template<template<class> class XX> class Y { - XX<int> x_; + XX<int> x_; // ERROR - Q::X not a template }; -Y<Q::X> y; +Y<Q::X> y; // ERROR - instantiated from here |