From: jason Date: Mon, 7 Feb 2000 20:35:14 +0000 (+0000) Subject: update X-Git-Tag: upstream/4.9.2~103348 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0c956d1d5a24137dcb88c9884252a59fa9526279;p=platform%2Fupstream%2Flinaro-gcc.git update git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@31836 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/testsuite/g++.old-deja/g++.bob/nested1.C b/gcc/testsuite/g++.old-deja/g++.bob/nested1.C index b5b7a76..aacfef4 100644 --- a/gcc/testsuite/g++.old-deja/g++.bob/nested1.C +++ b/gcc/testsuite/g++.old-deja/g++.bob/nested1.C @@ -1,15 +1,16 @@ // Build don't link: - class A { - class B { - typedef long T; - int i; - }; + +struct A { + struct B { + typedef long T; + int i; }; - class C { - class B { - typedef float T; - int i; - }; +}; +struct C { + struct B { + typedef float T; + int i; }; +}; C::B::T a; diff --git a/gcc/testsuite/g++.old-deja/g++.brendan/enum6.C b/gcc/testsuite/g++.old-deja/g++.brendan/enum6.C index 8c5c9ad..8e1a6df 100644 --- a/gcc/testsuite/g++.old-deja/g++.brendan/enum6.C +++ b/gcc/testsuite/g++.old-deja/g++.brendan/enum6.C @@ -11,6 +11,6 @@ void h(X* p) { X::E2 e2; int x2 = X::a2; - X::E1 e1; + X::E1 e1; // ERROR - within this context int x1 = X::a1; // ERROR - within this context } diff --git a/gcc/testsuite/g++.old-deja/g++.brendan/nest11.C b/gcc/testsuite/g++.old-deja/g++.brendan/nest11.C index 4a57b38..8a5de0f 100644 --- a/gcc/testsuite/g++.old-deja/g++.brendan/nest11.C +++ b/gcc/testsuite/g++.old-deja/g++.brendan/nest11.C @@ -6,6 +6,8 @@ class A { struct B { int x; }; + struct C; + friend struct C; struct C { int bug (A::B &y); }; diff --git a/gcc/testsuite/g++.old-deja/g++.jason/report.C b/gcc/testsuite/g++.old-deja/g++.jason/report.C index e514ae7..ed4d183 100644 --- a/gcc/testsuite/g++.old-deja/g++.jason/report.C +++ b/gcc/testsuite/g++.old-deja/g++.jason/report.C @@ -38,15 +38,15 @@ int foo2 (int (*a)(int) = &foo) } class X{ - class Y{}; + class Y{}; // ERROR - private }; typedef int const * bart (); typedef bart const * const * bar2; // ERROR - qualifiers bar2 baz (X::Y y) -{ - X::Y f; +{ // ERROR - in this context + X::Y f; // ERROR - in this context bar2 wa [5]; wa[0] = baz(f); undef2 (1); // ERROR - implicit declaration diff --git a/gcc/testsuite/g++.old-deja/g++.law/arm14.C b/gcc/testsuite/g++.old-deja/g++.law/arm14.C index d50b3cd..d4195d2 100644 --- a/gcc/testsuite/g++.old-deja/g++.law/arm14.C +++ b/gcc/testsuite/g++.old-deja/g++.law/arm14.C @@ -18,7 +18,7 @@ void h(X* p) { X::E2 e2; int x2 = X::a2; - X::E1 e1; // Should be rejected, but isn't.// ERROR - .* , XFAIL *-*-* + X::E1 e1; // ERROR - within this context int x1 = X::a1; // ERROR - Should be rejected, and is. } diff --git a/gcc/testsuite/g++.old-deja/g++.mike/p8785.C b/gcc/testsuite/g++.old-deja/g++.mike/p8785.C deleted file mode 100644 index e10f4cf..0000000 --- a/gcc/testsuite/g++.old-deja/g++.mike/p8785.C +++ /dev/null @@ -1,25 +0,0 @@ -// Build don't link: -// prms-id: 8785 - -class Outer { -private: - int x; // ERROR - private -public: - struct Inner { - int y; - void f( Outer * p, int i) { - p->x = i; // ERROR - - }; - void f( Outer & p) { - p.x = y; // ERROR - - }; - }; -}; - -int main() { - Outer::Inner A; - Outer Thing; - - A.f(Thing); - A.f(&Thing,2); -} diff --git a/gcc/testsuite/g++.old-deja/g++.mike/pmf2.C b/gcc/testsuite/g++.old-deja/g++.mike/pmf2.C index 5a5aa06..e50f472 100644 --- a/gcc/testsuite/g++.old-deja/g++.mike/pmf2.C +++ b/gcc/testsuite/g++.old-deja/g++.mike/pmf2.C @@ -8,8 +8,8 @@ public: }; class B_table : private A_table { - typedef void (B_table::* B_ti_fn) (int &item); public: + typedef void (B_table::* B_ti_fn) (int &item); B_table() { j = 0x4321;} virtual void call_fn_fn1(int &item, void *pfn1); void func1(int &item) { printf("func1(%d)\n",item);} diff --git a/gcc/testsuite/g++.old-deja/g++.other/access7.C b/gcc/testsuite/g++.old-deja/g++.other/access7.C new file mode 100644 index 0000000..5566d35 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.other/access7.C @@ -0,0 +1,33 @@ +// Test that access control for types and statics works properly +// with nested types. + +// Build don't link: + +class A { + static int I1; // ERROR - private + struct B1 { }; // ERROR - private +public: + static int I2; + struct B2 { }; +}; + +class D: public A { + struct E { + void f (); + }; +}; + +void D::E::f () +{ + int i = I1; // ERROR - within this context + B1 b1; // ERROR - within this context + i = I2; + B2 b2; +} + +void f () +{ + A::B1 b1; // ERROR - within this context + new A::B1; // ERROR - within this context + (A::B1) b1; // ERROR - within this context +} diff --git a/gcc/testsuite/g++.old-deja/g++.pt/dynarray.C b/gcc/testsuite/g++.old-deja/g++.pt/dynarray.C index 3e57b7b..62371fc 100644 --- a/gcc/testsuite/g++.old-deja/g++.pt/dynarray.C +++ b/gcc/testsuite/g++.old-deja/g++.pt/dynarray.C @@ -1,6 +1,7 @@ // Build don't link: // Special g++ Options: -ansi // Origin: Theo Papadopoulo +// Special g++ Options: inline const unsigned& f(unsigned const& a) { return a; diff --git a/gcc/testsuite/g++.old-deja/g++.pt/explicit72.C b/gcc/testsuite/g++.old-deja/g++.pt/explicit72.C index bc9edfb..6e3e851 100644 --- a/gcc/testsuite/g++.old-deja/g++.pt/explicit72.C +++ b/gcc/testsuite/g++.old-deja/g++.pt/explicit72.C @@ -3,13 +3,13 @@ // Adapted by Alexandre Oliva // plain char, signed char and unsigned char are distinct types -template class bug {}; -template class bug { typedef char t; }; -template class bug { typedef unsigned char t; }; -template class bug { typedef signed char t; }; -template class bug { typedef char t; }; -template class bug { typedef unsigned char t; }; -template class bug { typedef signed char t; }; +template struct bug {}; +template struct bug { typedef char t; }; +template struct bug { typedef unsigned char t; }; +template struct bug { typedef signed char t; }; +template struct bug { typedef char t; }; +template struct bug { typedef unsigned char t; }; +template struct bug { typedef signed char t; }; void foo() { bug::t();