plateform
stringclasses
1 value
repo_name
stringclasses
2 values
name
stringlengths
1
78
ext
stringclasses
2 values
path
stringlengths
15
1.11k
size
int64
1
8.55M
source_encoding
stringclasses
11 values
md5
stringlengths
32
32
text
stringlengths
0
8.49M
google
chromium
undef1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ns/undef1.C
97
utf_8
74672b3a85e5f203e098165b872316ad
// { dg-do assemble } namespace A{ } struct Y: A::S<int>{}; //{ dg-error "" } no such type
google
chromium
template4
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ns/template4.C
175
utf_8
a6d668c517d698af92324c4653d1daa3
// { dg-do run } namespace NS { template <typename T> void solver (){} } template<typename T> void solver(){} int main() { solver<double>(); NS::solver<double>(); }
google
chromium
ns4
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ns/ns4.C
112
utf_8
9c96b7a7d9f5e6c5f75e3e7ec55f16ed
// { dg-do assemble } namespace A{ enum foo{a,b,c}; } using A::foo; using A::b; void g() { foo x; x=b; }
google
chromium
template13
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ns/template13.C
596
utf_8
4a3f2c1d776b2a3c4f2f07360ebf776b
// { dg-do compile } // Templates defined outside must be declared inside namespace bar { // trick it to provide some prior declaration template<class T> void foo(); // { dg-error "definition" } template<class T>class X; // { dg-message "note: previous declaration" } } template <typename T> T const bar::foo(T ...
google
chromium
template7
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ns/template7.C
224
utf_8
1c6ee0a1bb618267fbe665d645884e8e
// { dg-do assemble } namespace foo { template<class F> struct bar {}; } void baz() { foo::bar(); // { dg-error "" } template used as expression }
google
chromium
koenig7
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ns/koenig7.C
348
utf_8
c8dceabaa72c6c5c2c174d456a76e1c8
// { dg-do run } // Test for Koenig lookup involving overloaded functions. namespace N1 { struct A { }; void f1(A) {} void f2(float) {} void g(void (*)(float)) {} } using N1::f1; void f1(float) {} using N1::f2; template <class T> void f2(N1::A, T) {} void g(void (*)(int)) {} int main() { g(&f1); // W...
google
chromium
ns13
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ns/ns13.C
125
utf_8
e44509ec92e8fc89c8c716fa7e54720d
// { dg-do run } namespace std{ void f(){} void g(); int i=5; } void std::g() {} int main() { return std::i-5; }
google
chromium
using3
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ns/using3.C
275
utf_8
122a4ea21ae440e6b703061102e0c7a2
// { dg-do assemble } typedef unsigned int atypedef; struct astruct{}; void afunction(); void aovlfunction(); void aovlfunction(int); int avariable; namespace foo { using ::atypedef; using ::astruct; using ::afunction; using ::aovlfunction; using ::avariable; }
google
chromium
alias6
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ns/alias6.C
386
utf_8
5a4c153472b2c8c1983aed495db2717b
// { dg-do run } // Check namespace aliases inside blocks namespace A { int i; void f(){ i = 0; } } int g(); int main () { namespace B = A; B::i=42; B::f(); using namespace B; f(); // A::i is now 0, B::i is 1 return g(); } namespace B { int i = 1; } int g() { namespace x = A; if (x::...
google
chromium
lookup5
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ns/lookup5.C
315
utf_8
93d3fd278332d098b26a321966343d42
// { dg-do assemble } namespace A{ void f(); } namespace B{ using namespace A; void f(int); // { dg-error "" } referenced below } using namespace B; void g() { ::f(); // { dg-error "" } A::f is not found } using namespace A; void g1() { ::f(); // ok, it is found now }
google
chromium
lookup3
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ns/lookup3.C
114
utf_8
8ca812b3514e2dd57929d04527c41336
// { dg-do run } namespace A{ int i; int f(); } int A::f() { return i; } int main() { return A::f(); }
google
chromium
type1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ns/type1.C
346
utf_8
407b4397b4f3b0785112e49bb5cd3005
// { dg-do assemble } // Test that using an elaborated-type-specifier in a namespace to refer // to a class outside the namespace does not cause its name to be considered // declared in the namespace. struct A { }; int A; namespace N { struct A *f (); } using namespace N; struct A *a;
google
chromium
ns15
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ns/ns15.C
40
utf_8
ebaac0ab353b9b03b23469d86f47157d
// { dg-do assemble } namespace std {}
google
chromium
using2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ns/using2.C
61
utf_8
c0116d02edfe6d83a6e0319b7ae43310
// { dg-do assemble } void f(); namespace A{ using ::f; }
google
chromium
template11
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ns/template11.C
171
utf_8
6cb7cc1d655ff7d02bf6b115d27c2f20
// { dg-do run } void foo(){} namespace Bar{ template<class X> class Y{ friend void foo(Y<X>){} }; } int main() { Bar::Y<int> y; foo(y); foo(); }
google
chromium
alias3
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ns/alias3.C
355
utf_8
ff668e97c862ec9d9872e11a1ca7e91f
// { dg-do run } namespace A{ struct X{}; void f(X&); extern int i; namespace a_very_long_namespace_name{ int k; } } namespace B = A; namespace B = A; namespace B = B; namespace avl = A::a_very_long_namespace_name; void B::f(A::X& x) { B::f(x); f(x); avl::k = 1; } int B::i = 0; int main() { ...
google
chromium
ns11
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ns/ns11.C
406
utf_8
ccd42fdc2dc6a2b87fb540bd4247eccf
// { dg-do assemble } // Build don't link // Check [namespace.memdef]/2 namespace A{ void f(int); void f(int,int); int i; // { dg-error "" } .* } void A::f(){} // { dg-error "" } should have been declared before namespace B{ void A::f(int){} // { dg-error "" } B does not surround A }...
google
chromium
using11
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ns/using11.C
131
utf_8
1fcf3b1e575d6ca566f2fd977f19bcc1
// { dg-do assemble } class joey { public: typedef int SVec; }; using joey::SVec; // { dg-error "" } joey is not a namespace
google
chromium
koenig9
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ns/koenig9.C
316
utf_8
1d9747eb19c613728fa93e94b8db7519
// { dg-do assemble } #include <algorithm> void foo(const char*,...); inline void bar() { foo("",count); // { dg-error "" } multiple overloaded count functions }
google
chromium
ns3
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ns/ns3.C
192
utf_8
3ae50688828246dd500f69a0de29fbb3
// { dg-do assemble } namespace foo{ void eine_funktion(int) {} } using namespace foo; namespace foo{ void eine_funktion(int,int) {} } void andere_funktion() { eine_funktion(3,4); }
google
chromium
template2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ns/template2.C
189
utf_8
73d49c61290b79275cc9f49efdafcaff
// { dg-do assemble } //Inheritance from templates which are namespace members namespace foo { template <class T> struct x { x(){} }; } class y : public foo::x<int> {}; y r;
google
chromium
template14
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ns/template14.C
192
utf_8
afc2243e3e99fc8452d9346da94c86bd
// { dg-do assemble } namespace Outer { template <class T> class Inner; } template <class T> class Outer::Inner { public: Inner (); };
google
chromium
koenig2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ns/koenig2.C
191
utf_8
b1e98db20e458599a3989c99144930ea
// { dg-do assemble } // { dg-options "" } // Check association of {error} for Koenig lookup struct QString { operator void * (); }; int foo() { QString bar; return (bar == __null ); }
google
chromium
ns6
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ns/ns6.C
141
utf_8
432dfa0f46a8ab12692ae5c7f0f85499
// { dg-do run } namespace A{ int i; namespace B{ void f(){i++;} int i; void g(){i++;} } } int main() { return A::i-A::B::i; }
google
chromium
using13
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ns/using13.C
258
utf_8
83100bb2e5d0f0acdd78e8e5e8d2db9c
// { dg-do run } namespace A{ void foo(int){} } namespace B{ void foo(bool){} } void bar() { using B::foo; using A::foo; foo(true); } namespace Foo { template<class N> void Hello(N) {} } int main() { using Foo::Hello; Hello(4); bar(); }
google
chromium
template18
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ns/template18.C
240
utf_8
d79eec58cdd08f618d30b9dbb15833d2
// { dg-do link } namespace A { int j; template <typename val_t> struct X { inline X () { extern int j; i = j; } int i; }; } int main () { A::X<int> x; }
google
chromium
type2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ns/type2.C
444
utf_8
7a9f1a10a4a8958b9a4b2668f348b45a
// { dg-do assemble } // // Bug 2125. TYPE_DECLS never had their DECL_CONTEXT set, which // confused forward references to classes. typedef void T; namespace A { class C; typedef class C C; typedef int T; class C { T i; // got bogus error, found wrong T }; }
google
chromium
anon1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ns/anon1.C
93
utf_8
3f29778f04a48040d4674da3cb03f761
// { dg-do run } namespace{ void f(); } int main() { f(); } namespace{ void f(){} }
google
chromium
friend2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ns/friend2.C
105
utf_8
a1cd086b33bc3d6ba70f12f6067be3ef
// { dg-do assemble } namespace A{ void foo(); } namespace B{ class B{ friend void A::foo(); }; }
google
chromium
overload3
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ns/overload3.C
130
utf_8
58c2533d4f809584c8591b980dec0b8d
// { dg-do assemble } namespace A{ void f(); } using A::f; namespace A{ void f(int); } using A::f; void g() { f(4); }
google
chromium
koenig3
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ns/koenig3.C
304
utf_8
266341d48a47c15170ec783c99d32be1
// { dg-do run } //Check association of member pointer in overload resolution. struct A { int m_val; friend int operator ->* (A & other, int A::*pm) { return 31; } }; int A::*pi = & A::m_val; int main(void) { A c; c.m_val = 42; int j = c ->* pi; if (j == 31) return 0; else return 1; }
google
chromium
main1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ns/main1.C
297
utf_8
9b951c773784c7c3cc13ada78ad54dc6
// { dg-do assemble } // main is only reserved in the global namespace [basic.start.main]/3 namespace A { void main () { } } namespace B { void main () { } } namespace C { void main () { } namespace D { void main () { } } }
google
chromium
alias2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ns/alias2.C
100
utf_8
4b39531ed9b75627ccd39bd45bcce308
// { dg-do assemble } namespace NS1 { int a; } namespace NS2 = NonExistant; //{ dg-error "" }
google
chromium
template10
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ns/template10.C
158
utf_8
f15dc5f7af9a94c864dcd08798fbfe61
// { dg-do assemble } namespace N { template <class T> void g() {} } void (*pf)() = N::g<int>;
google
chromium
using14
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ns/using14.C
170
utf_8
b0d977f7849d8a44750909027e43b53f
// { dg-do assemble } extern "C" void f (); namespace N { extern "C" void f (); } using N::f; void g () { f (); }
google
chromium
koenig6
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ns/koenig6.C
179
utf_8
e6014e703fe3e48049afe0bf6475b0cb
// { dg-do assemble } namespace A{ struct X{}; X foo(X a){return a;} void bar(X*){} } int main() { A::X x; bar(&foo(x)); // { dg-warning "" } address of temporary }
google
chromium
template1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ns/template1.C
94
utf_8
039d19c86cd107b1fdcec33f4214e0e4
// { dg-do assemble } namespace foo { template <class T> class x {}; } foo::x<int> y;
google
chromium
bogus1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ns/bogus1.C
145
utf_8
1576f73d488f01626d95cc2b893b6fda
// { dg-do assemble } namespace N {} void f(int N::k); // { dg-error "" } class Foo { int N::j; // { dg-error "" } invalid use of `::' };
google
chromium
template15
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ns/template15.C
152
utf_8
fb7efad85b5d9c15dafe0c0fe014f92e
// { dg-do assemble } namespace X { template <class T> void f () {} } template void X::f<int> ();
google
chromium
overload5
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ns/overload5.C
158
utf_8
404e0e77a85f8fb64e9e34dedca94fa6
// { dg-do assemble } namespace A{ void f(){} } using A::f; void f(int); void f(){} // { dg-error "" } conflict void g() { f(4); }
google
chromium
using8
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ns/using8.C
192
utf_8
e592ac6b9789af1e806b4791c984da05
// { dg-do assemble } namespace M { int i; } namespace N { using namespace M; } using namespace N; int j = i; namespace O{ int k; } namespace N { using namespace O; } int l = k;
google
chromium
lookup1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ns/lookup1.C
73
utf_8
e93b5e47138610cc96cd1e47e5a6d555
// { dg-do assemble } typedef int __quad_t; typedef __quad_t __qaddr_t;
google
chromium
using7
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ns/using7.C
98
utf_8
ea73badcef0f5166a559e07a0c263a92
// { dg-do run } namespace X{ void f(int){} } void f(); int main() { using X::f; f(3); }
google
chromium
lookup4
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ns/lookup4.C
276
utf_8
42d07132c8589b594e5fe06abcf87a15
// { dg-do assemble } namespace X{ typedef int foo; const int bar=2; namespace Y{ void f(foo); extern int g; extern int g1; struct h{ void i(foo); }; } } void X::Y::f(foo) { } int X::Y::g = bar; int X::Y::g1(bar); void X::Y::h::i(foo) {}
google
chromium
koenig1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ns/koenig1.C
202
utf_8
d0f32b7b3cfe72c80a1c5c6794635baf
// { dg-do assemble } class ostream; extern ostream cout; namespace foo { struct S { int i; }; extern ostream &operator<<(ostream &, const S &); } void bar(foo::S s) { cout << s ; }
google
chromium
ns7
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ns/ns7.C
305
utf_8
26f888c874f4df42d61aa8ebaa00fa0b
// { dg-do assemble } namespace A{ struct X{ int i; X(){} X(int j); void operator=(const X&); virtual ~X(){} }; void X::operator=(const X&o) { i=o.i; } } A::X::X(int j):i(j){} namespace A{ struct Y:public X{ int j; Y(int,int); }; } A::Y::Y(int a,int b):X(a),j(b) {}
google
chromium
alias4
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ns/alias4.C
361
utf_8
f251f052e0ffb2f3365f84e0177f0cee
// { dg-do assemble } namespace A = B; // { dg-error "" } unknown namespace namespace C{} namespace D = C; namespace D { // { dg-error "" } reopening namespace with alias void f(); } void C::f(){} // { dg-error "" } previous definition void D::f(){} // { dg-error "" } redefinition namespace E = C:...
google
chromium
using9
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ns/using9.C
528
utf_8
10a3890377e72341f4119f4affe2c8cb
// { dg-do assemble } // Test for proper merging of functions from multiple using directives. namespace standard { void print(int) {} void dump(int) {} } namespace A { using standard::print; } namespace B { using namespace standard; } namespace User { using namespace standard; using namespace A; void test()...
google
chromium
using4
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ns/using4.C
153
utf_8
55a6f7a2805429769338bfc315e29145
// { dg-do assemble } //Build don't link #include <vector> namespace csp { using namespace std::vector; // { dg-error "" } vector is not a namespace }
google
chromium
using6
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ns/using6.C
123
utf_8
61181fe4d561761dfd5906a6a77203a2
// { dg-do assemble } #include <vector> namespace csp { using namespace std; struct X { vector<int> v; }; }
google
chromium
koenig5
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ns/koenig5.C
426
utf_8
4ce4c0f8fabd3c8591ef1320137fad47
// { dg-do assemble } // To find function pointers in Koenig lookup is ok as long as we only find one. namespace A{ void foo(); struct X{}; void (*bar)(X*)=0; } using A::X; void (*foo)(X*)=0; void g() { foo(new X); // ok -- DR 218 says that we find the global // foo variab...
google
chromium
ns9
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ns/ns9.C
166
utf_8
46f13ac5afdf46c74f55fda9464a19f3
// { dg-do assemble } namespace bb { int f(int); namespace k { void foo(int bar) { return bb:f(bar); //{ dg-error "" } syntax error } } }
google
chromium
ns14
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ns/ns14.C
126
utf_8
5891420984851379a8e57e5b2a0bacc2
// { dg-do run } namespace std{ int f(){ return 0; } } int f() { return 1; } int main() { return std::f(); }
google
chromium
extern1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ns/extern1.C
311
utf_8
e7ae6c01430fe184836d998bc4619af4
// { dg-do link } // An extern declaration of an undeclared object within a function // introduces the object into the enclosing namespace [basic.link]/7 namespace { void foo() { extern int xx; xx = 0; } int xx = 1; } int main() { xx = 2; }
google
chromium
template16
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ns/template16.C
294
utf_8
246a7c995987f869d396fc8ce59f41d6
// { dg-do assemble } // Test that pushing into a namespace for a definition doesn't affect // template instantiations. namespace N { template <class T> void f () { } template <class T> struct A { friend void f<T>(); }; } namespace M { struct B; } struct M::B: public N::A<int> { };
google
chromium
template8
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ns/template8.C
128
utf_8
572350f61cd31fb645db99d27eea1ae9
// { dg-do assemble } namespace X { template <class T> class foo; } template <class T> class X::foo { T worthless; };
google
chromium
crash1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ns/crash1.C
150
utf_8
f4e9ca642ad2357663c99460eb9dc63d
// { dg-do assemble } template <class T> struct S1 {}; namespace N { } struct S2 { typedef N::S1<int> S2_T; // { dg-error "" } parse error };
google
chromium
template9
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ns/template9.C
901
utf_8
ee74d571b61ee2790eca68613745e54a
// { dg-do run } // Produces ICE 980519. namespace vector { // allocate memory for vector template <class T> inline T* alloc(const int aWidth) { // allocate memory return new T[aWidth]; } } namespace matrix { // allocate memory for matrix ...
google
chromium
using12
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ns/using12.C
473
utf_8
e8c2f3bd562bc38388d272d4d64a65af
// { dg-do assemble } namespace foo { void x (bool); // { dg-message "candidates" } void x (char); // { dg-message "note" } candidates void x (int); // { dg-message "note" } candidates void x (double); // { dg-message "note" } candidates } namespace baz { void x (int); } // { dg-message "note" ...
google
chromium
overload2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ns/overload2.C
218
utf_8
38f94e950e14081178577cd7cfe9c1e9
// { dg-do assemble } namespace A{ void f(); // { dg-message "note" } } using namespace A; void f(); // { dg-message "note" } void g() { f(); // { dg-error "ambiguous" } ambiguous, ::f or A::f ? }
google
chromium
ns16
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ns/ns16.C
143
utf_8
77aedd83c7d93f08415cbb6268ba0b95
// { dg-do assemble } class Y { public: void operator +(int) const; }; namespace X { extern Y const& z; } void f(void) { X::z + 1; }
google
chromium
alias1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ns/alias1.C
199
utf_8
64c5d1a3167a533ce9cc98bfefdd1ebd
// { dg-do run } namespace foo{ int eine_funktion(int) { return 0; } } namespace foo{ void eine_funktion(int,int) {} } namespace bar = foo; int main() { return bar::eine_funktion(3); }
google
chromium
using1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ns/using1.C
66
utf_8
718e0c469228e45d5db2aa2abf67d121
// { dg-do assemble } using namespace bb; // { dg-error "" } .*
google
chromium
ns19
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ns/ns19.C
131
utf_8
aad198d090f300cc8091fe46363ccb78
// { dg-do assemble } namespace N { enum { E = 0 }; static int f() { return E; } }
google
chromium
crash4
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ns/crash4.C
175
utf_8
e62c91a9ce451cfbd36af63f733470b6
// { dg-do assemble } namespace N { template<class T> class C { template<class U> friend class C; }; }
google
chromium
ns10
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ns/ns10.C
163
utf_8
fc6a7e08ed0cee9d6e593a2555659ac0
// { dg-do assemble } namespace bb { int f(int); namespace k { void foo(int bar) { int i=bb:f(bar); // { dg-error "" } namespace } } }
google
chromium
lookup2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ns/lookup2.C
166
utf_8
4b6b2ac3e3d74481640ca27d3acf97f9
// { dg-do assemble } template <class charT> struct basic_string { charT append (charT c) { return c; } }; typedef char c; template class basic_string <char>;
google
chromium
template17
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ns/template17.C
672
utf_8
1871d9ecaab279ca652b002d80dd7f59
// { dg-do assemble } // // Bug 2258. We failed to implement using directives inside template // functions. This makes us regress now that ::std is real. namespace thing { template <typename T> T end2 (T); } namespace whatever { } template <typename T> void fn (T, T (*)(T)); namespace whatever { template <typena...
google
chromium
ns8
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ns/ns8.C
91
utf_8
c13ad604317caad378cae29d39153e37
// { dg-do assemble } namespace B{ void f(); } using namespace B; void g() { ::f(); }
google
chromium
overload1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ns/overload1.C
457
utf_8
57c2d88994c1167bddb4a4380eb21797
// { dg-do run } // Unqualified lookup should find all functions. // Duplicates are ignored as long as they lose during overload resolution. namespace A{ int f(){ return 1; } int f(double); } namespace B{ int f(int){ return 2; } int f(double); } int f(int,int) { return 3; } using namespace A; u...
google
chromium
flow1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.warn/flow1.C
197
utf_8
8e6c43e1ca88faef2525ef3c74453bb2
// { dg-do assemble } // { dg-options "-Wreturn-type" } // Test that we don't get a warning about flowing off the end. struct A { ~A (); }; int f() { A a1[2]; A a2[2]; return 1234567; }
google
chromium
virt1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.warn/virt1.C
197
utf_8
8005975800b73ab7a05b4dd3e210a9c3
// { dg-do assemble } // { dg-options "-Woverloaded-virtual" } struct A { virtual void f(); // { dg-warning "" } hidden }; struct B: public A { void f(int); // { dg-warning "" } by this };
google
chromium
impint
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.warn/impint.C
1,873
utf_8
c50f9eb594e02b1ed89d96b064e2c0d1
// { dg-do assemble } // { dg-options "-Wconversion" } // 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 (); vo...
google
chromium
cast-align1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.warn/cast-align1.C
532
utf_8
c04c5df1af975e2555996996c93c2bc3
// { dg-do assemble { target sparc-*-* } } // { dg-options "-ansi -pedantic-errors -Wcast-align" } // converting a T * to void * does not need a complete T, and doesn't // increase alignment requirements. struct X; struct Y; struct Z {double m;}; void f3 (X *xp, Z *zp) { (void *)xp; (void *)zp; (Y *)xp; (Y *)zp...
google
chromium
inline
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.warn/inline.C
1,671
utf_8
a885b90302ee9e0cb5c2e13efa009de3
// { dg-do assemble } // { dg-options "-ansi -pedantic-errors -Winline -O1" } inline void wibble () {} inline void wobble () {} // { dg-bogus "" } cannot inline void bar (void (*)()); void bar1 () { wibble (); // can be inlined void (*ptr) () = wobble; // force out of line ...
google
chromium
impint2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.warn/impint2.C
1,699
utf_8
4331e954dcb709dcbbc35224b3be85da
// { dg-do assemble } // { dg-options "-Wconversion" } struct X { X (int const &); X (int const &, int const &); }; void foo (int const &); void wibble (int const &); void wibble (int const &, int const &); void punk (int const & = 3.5f); // { dg-warning "" } in passing void rock (); void rock (int const &,...
google
chromium
iomanip
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.warn/iomanip.C
257
utf_8
d53cb2073c8f36697f63dfe19779eb13
// { dg-do assemble } // { dg-options "-O -Winline" } // Bug: g++ wouldn't inline op<< because it was an explicit instantiation. #include <iomanip> #include <iostream> void f() { std::cout << std::setw(3); }
google
chromium
warn01
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.benjamin/warn01.C
1,706
utf_8
56e49f1c8229edeb65b0d075772cf7fe
// { dg-do assemble } // { dg-options "-Wall -Weffc++" } //1 g++/12952 un-named variables in a catch block //Wall or Wunused should not give warnings here template <class T> void f (void) { try { } catch( int) { } } // //2 g++/12923 __attribute__((__unused__)) not working for objects //W...
google
chromium
tem06
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.benjamin/tem06.C
895
utf_8
41b0c9f614d7008ceae61fc6d2fea5ad
// { dg-do run } // 980945 bkoz // test for correct operators at link time /* /tmp/cca211431.o: In function `void blah<foo<int> >(foo<int> const &)': /tmp/cca211431.o(.void gnu.linkonce.t.blah<foo<int> >(foo<int> const &)+0x1e): undefined reference to `void x<int>(int const &)' */ template<class T> class foo { publi...
google
chromium
friend02
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.benjamin/friend02.C
360
utf_8
dec5ca9e16504f6b98460424ce0ca6dd
// { dg-do assemble } //980610 bkoz // example 2: ok class bar; class foo { public: int func(bar *); foo(){} ~foo(){} }; class bar { int st; public: bar(){st=12;} ~bar(){} friend int foo::func(bar *); }; int foo::func(bar *obj) { obj->st++; return (obj->st); } void test02() { foo obj_f; ...
google
chromium
16567
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.benjamin/16567.C
630
utf_8
3d4d8b33b7e90ee1bd5fd00ee46647e1
// { dg-do assemble } // 981203 bkoz // g++/16567 typedef bool Bool; typedef unsigned char Uint8; typedef unsigned short Uint16; typedef unsigned int Uint32; enum e_ms { third = 3, fourth = 4 }; struct bitmask { Uint8* anon1; Uint32 anon2; Uint8 anon3; Uint8 here: 2; Uint8 anon4: 2; Uint8 anon5:...
google
chromium
15309-2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.benjamin/15309-2.C
203
utf_8
ac3db6b12db0b5a07c59f5082d10a429
// { dg-do assemble } // { dg-options "-Wnon-virtual-dtor -Weffc++" } // 981203 bkoz // g++/15309 class bermuda { // { dg-warning "" } // WARNING - public: virtual int func1(int); ~bermuda(); };
google
chromium
friend01
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.benjamin/friend01.C
408
utf_8
4f0cb9084aea0b4b4780571fe3c08caa
// { dg-do assemble } //980610 bkoz // example 1: buggy class foo { public: class bar; int func(bar *); class bar { int st; public: bar(){st=12;} ~bar(){} friend int foo::func(bar *); }; foo(){} ~foo(){} }; int foo::func(bar *obj) { obj->st++; return (...
google
chromium
15309-1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.benjamin/15309-1.C
270
utf_8
c610ef733ecc42a869345c7055d16347
// { dg-do assemble } // { dg-options "-Wnon-virtual-dtor -Weffc++" } // 981203 bkoz // g++/15309 class bahamian { public: bahamian (); ~bahamian (); }; class miami : public bahamian { // { dg-warning "" } // WARNING - public: miami (); ~miami (); };
google
chromium
p13721
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.benjamin/p13721.C
243
utf_8
62001cb932153adb89a3d72a63e21329
// { dg-do assemble } // prms-id: 13721 class A { public : int a; }; class B : public A { public : void cmp(int a, int b) {} B(int a = 0) { cmp(A::a, a); //should not give warning } }; int main(void) { return(1); }
google
chromium
tem04
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.benjamin/tem04.C
4,169
utf_8
c9f9e6418b42d7a770764aed11096f68
// { dg-do assemble } // 980827 bkoz // template parameter redeclaration bugs, part two: // template template params and expanded template non-type parms // 14.1 Template parameters // p 13 // The scope of a template-parameter extens from its point of // declartion until the end of its template. In particular, a // t...
google
chromium
13523
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.benjamin/13523.C
261
utf_8
157940bf603a35fc56eb917d13800982
// { dg-do assemble } // 981203 bkoz // g++/13523 template<typename T> class latin_america; class peru { friend class latin_america<int>; // Particular template class friend works template<class T> friend class latin_america; // This does not work. };
google
chromium
15800-2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.benjamin/15800-2.C
257
utf_8
3b083807b20b52cabac534de521ca23b
// { dg-do assemble } // 981203 bkoz // g++/15800 + test struct panama { panama(); panama(panama &); panama& operator=(panama&); panama& getref() { return *this; } }; extern panama dig(); void foo() { panama obj; obj = dig().getref(); }
google
chromium
16077
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.benjamin/16077.C
590
utf_8
fc8a8e13982233faabec380e8f3dba0b
// { dg-do assemble } // 981203 bkoz // g++/16077 // { dg-options "-Wconversion" } class nicaragua; struct colombia { colombia(); colombia(const colombia &); colombia(const nicaragua &); colombia &operator= (const colombia&); }; struct nicaragua { public: nicaragua(); nicaragua(const nicaragua&); ...
google
chromium
15822
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.benjamin/15822.C
452
utf_8
77e9f5b895bcd88e85e22bd235323252
// { dg-do run } // 981203 bkoz // g++/15822 #include <assert.h> static unsigned int gcount; struct playahermosa { playahermosa() { ++gcount; } playahermosa(const playahermosa &) { ++gcount; } ~playahermosa() { --gcount; } }; struct playacoco { playacoco(const playahermosa& = playahermosa()) { } //create ...
google
chromium
15799
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.benjamin/15799.C
661
utf_8
f1c5bd18516555fb9dc6c76ab8e05414
// { dg-do assemble } // 981203 bkoz // g++/15799 test1 /* 15799.cpp: In function `void foo()': 15799.cpp:21: call of overloaded `sanjose({anonymous enum})' is ambiguous 15799.cpp:13: candidates are: sanjose::sanjose(const sanjose &) <near match> 15799.cpp:14: sanjose::sanjose(unsigned int) */ type...
google
chromium
15054
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.benjamin/15054.C
180
utf_8
cd82f5ef71fe2b5c2d726edde7e3f65c
// { dg-do assemble } // { dg-options "-Wno-pointer-arith" } // 981203 bkoz // g++/15054 // note that -pedantic also turns on this warning void cuba(void) { void* p; p++; }
google
chromium
bool01
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.benjamin/bool01.C
1,280
utf_8
056db47cf68f100a3c569e76252caf73
// { dg-do run } //980323 bkoz //test for bools with inclusive ors #include <assert.h> #include <limits.h> void bar ( bool x ) {} void bars ( short x ) {} /* 980326 bkoz this is not initialized and so can have indeterminate value. */ #if 0 int orb(){ bool y; bar ( y ); int blob = ( 27 | int (y) ); return ...
google
chromium
14687
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.benjamin/14687.C
854
utf_8
d5029d042a715327d7d9c5244b1f6ed8
// { dg-do run } // 981203 bkoz // g++/14687 #include <assert.h> unsigned int gtest; // 7.3.3 the using declaration // p 3 struct belieze { void f(char); void g(char); enum E { e }; union { int x; }; }; struct dominica: belieze { using belieze::f; void f(int i) { f('c'); } // calls belieze::f(char) v...
google
chromium
warn03
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.benjamin/warn03.C
217
utf_8
ba6e64338ba5d146b7cd864b0d3d18a3
// { dg-do assemble } // { dg-options "-Wredundant-decls" } // 980420 bkoz // from g++/15307, tests for -Wredundant-decls for decls //shouldn't crash extern unsigned char *foo5[]; extern unsigned char *foo5[];
google
chromium
typeid01
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.benjamin/typeid01.C
1,294
utf_8
dc34add658f20519cb6e238d0aef91c0
// { dg-do run } // 980617 bkoz // typeid for local types // typeid bool vs int and enum vs int #include <typeinfo> #ifdef DEBUG_ASSERT #include <assert.h> #endif // 4: local class in non-main function void test1 (void) { bool class_p = false; class X2 { private: unsigned int counter; public: X2 (u...
google
chromium
13478
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.benjamin/13478.C
548
utf_8
6b9eb9d0c1abbaae97f125caf6fa73b0
// { dg-do assemble } // 981203 bkoz // g++/13478 class A {}; class AData {}; typedef void (A::* hand) (void); struct hand_table { const int data1; const hand data2; }; class Agent : public A { public: enum { first = 1, last }; protected: static const hand_table table_1[]; static const AData table_2...
google
chromium
scope01
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.benjamin/scope01.C
1,629
utf_8
47901d5b5ac69dd3bacc041717940f4b
// { dg-do assemble } // 980604 bkoz // 3.4.5 Class member access p 4 // nested and non-nested calls, no dtors struct L { int ii; void foo(int a) {++a;} struct Linner { int ii_inner; void foo_inner(int b) {++b;} }; }; class A : public L {}; class B : public L {}; class C : public A, public B {}; ...
google
chromium
18208
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.benjamin/18208.C
396
utf_8
6c830e97620949de8d4c03bf0a532015
// { dg-do assemble } // 981204 bkoz // g++/18208 typedef unsigned int uint_32; class puertorico { public: void *f (); private: uint_32 member; }; void foo( ) { uint_32 ui; puertorico obj; // Bug using static_cast<> ui = static_cast<uint_32>(obj); // { dg-error "" } // ERROR - // Bug when missing ...
google
chromium
tem01
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.benjamin/tem01.C
3,200
utf_8
e0ff2e1f9c178c852486b8819018bb9d
// { dg-do assemble } // prms-id: 13911 template<unsigned int N> class ref_counter { public: ref_counter() : p_refcnt(new unsigned int(N)) {} ref_counter(const ref_counter<N>& x) : p_refcnt(x.p_refcnt) { ++*p_refcnt; } ref_counter& operator=(const ref_counter<N>& rhs) { ++*rhs.p_refcnt; decremen...