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
android
scoped3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lookup/scoped3.C
378
utf_8
fd5b1d6b45ff24d721908d389585b869
// { dg-do compile } // PR 7964. ICE with scoped method call struct A { virtual void ostr() const; }; class B : public virtual A {}; template<typename T> struct C : public B { void ostr() const { B::ostr(); } }; template struct C<int>;
google
android
hidden-class14
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lookup/hidden-class14.C
291
utf_8
e42ed06ffae73ddf17fdc1871b799347
// Origin PR c++/36019 // { dg-do compile } struct F { static const int x = 0; typedef int A; }; struct A { template <typename A> struct G : public F { static const A i = 0; }; }; int main () { return A::G<F>::i ; }
google
android
name-clash7
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lookup/name-clash7.C
167
utf_8
2523710bf2d0aaf35ba7fef535173651
// PR c++/28513 class foo { // { dg-error "changes meaning" } public: typedef int bar; }; class baz { public: foo::bar foo; // { dg-error "declaration" } };
google
android
using14
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lookup/using14.C
88
utf_8
566f22665e5dbaacccc9bab0af697314
// PR c++/21784 // { dg-options "" } namespace mine { int cpow; } using mine::cpow;
google
android
builtin5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lookup/builtin5.C
202
utf_8
5a22fe14e5179e9986e83f3e28285b3f
// PR c++/37276 // { dg-final { scan-assembler "_ZSt5atanhd" } } namespace std { inline double atanh(double __x) { return __builtin_atanh(__x); } } int main() { std::atanh(.3); return 0; }
google
android
friend9
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lookup/friend9.C
290
utf_8
9d3865e2b7ad7f2ada40573eca29da7d
// PR c++/25492 class Base { public: class Nested {}; }; class Derived:public Base { public: class Nested { public: void m(); }; class AnotherNested { friend class Nested; AnotherNested() {} }; }; void Derived::Nested::m() { Derived::AnotherNested instance; }
google
android
hidden-temp-class6
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lookup/hidden-temp-class6.C
232
utf_8
754fc789506af415caca6ae05d0b538d
// { dg-do compile } class B; namespace N { class A { template <class T> friend class B; B* b; }; }
google
android
builtin1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lookup/builtin1.C
149
utf_8
9b4af41a9b7ce52e2f2a1c0f80c2b16a
// PR c++/19367 // { dg-do link } void abort (void) { throw 3; } namespace std { using ::abort; } int main () { using std::abort; abort(); }
google
android
crash2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lookup/crash2.C
189
utf_8
6fc9e98dd31a974c79f311f71bfe2a82
// PR c++/14086 struct ClassA { ClassA(); }; struct ClassB { enum Enum {ClassB}; // { dg-error "" } ClassA key; ClassB(); virtual ~ClassB(); }; ClassB::ClassB() { }
google
android
java1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lookup/java1.C
1,327
utf_8
982d219f3971a11f0bdf84813dcb1b80
// { dg-do compile } // { dg-options "-fdollars-in-identifiers" } // Origin: Giovanni Bajo <giovannibajo at libero dot it> // Make sure that Java special functions can be called correctly. extern "Java" { typedef __java_int jint; namespace java { namespace lang { class Class; class Object; ...
google
android
using33
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lookup/using33.C
291
utf_8
94bbad7f3184b7a4e7108a576741b3c3
// { dg-do run } template <class T> struct Foo { int k (float) {return 0;} }; template <class T> struct Baz { int k (int) {return 1;} }; template <class T> struct Bar : Foo<T> , Baz<T> { using Foo<T>::k; using Baz<T>::k; }; int main() { Bar<int> bar; return bar.k( 1.0f ); }
google
android
using37
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lookup/using37.C
259
utf_8
ca7ffb32cb71dd0c7f7be2f574172240
// PR c++/30195 // { dg-do run } template<class T> struct B { void foo(T) {} }; template<class T> struct D : B<int>, B<double> { using B<int>::foo; using B<double>::foo; void bar() { foo(3); } }; int main() { D<int> x; x.bar(); return 0; }
google
android
crash5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lookup/crash5.C
105
utf_8
b829196dc637277366c74ac9ece4c7c6
// { dg-do compile } // // PR 17618 void foo() { p; // { dg-error "not declared" } (void*) p; }
google
android
friend1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lookup/friend1.C
231
utf_8
f095afdbf961d01e5ac006fff4dbda02
// { dg-do compile } // PR c++/9970: In-class friend function definition after // declaration lexical scope problem. void f(); struct X { enum { k = 1 }; friend void f() { char a[k]; } };
google
android
using4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lookup/using4.C
361
utf_8
a9f8bb8a4c2ceef1805b242e53567377
// { dg-do compile } // PR c++/9432: ICE in validate_nonmember_using_decl when decl is a // SCOPE_REF. template <class T> struct Foo; template <class T> struct Bar : public Foo<T> { void foo() { using Foo<T>::i; // { dg-error "not a namespace" } } };
google
android
using46
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lookup/using46.C
1,209
utf_8
38f3b5844af638f2b25004b769447f60
// PR c++/51141 // { dg-do compile } // { dg-options "-fpermissive -w -Werror" } typedef int size_t; template < size_t, size_t > struct AlignedBuffer {}; template < typename > class VectorBufferBase { public: allocateBuffer (size_t) { } buffer () { } *m_buffer; size_t m_capacity; }; template ...
google
android
scoped8
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lookup/scoped8.C
334
utf_8
92324568db680ca0f511086aae4a4555
// { dg-do compile } // PR c++/10371: Incorrect tree node built in // finish_non_static_data_member. struct A { int i; // { dg-error "non-static" } }; template <int> struct B { int foo() { return A::i; } // { dg-error "this location" } }; template struct B<0>;
google
android
koenig1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lookup/koenig1.C
286
utf_8
751d0b5e7453f5f49c388d10446f6515
// { dg-do compile } // PR 10026. We ICE'd class X; void foo() { X x(1); // { dg-error "incomplete type" "" } bar(x); // { dg-error "not declared" "" } }
google
android
using3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lookup/using3.C
188
utf_8
d56f4b6d96d8a5c73deddb44f985b2b0
// PR c++/9798 namespace std { } namespace STL { using namespace std; } namespace std { using namespace STL; } namespace STL { struct A { void B() { using namespace std; } }; }
google
android
this1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lookup/this1.C
164
utf_8
8b9ae54e36b3204ee122989fbde5a184
// PR c++/27581 // { dg-do compile } struct A { template<int> static void foo(); static void bar() { this->A::foo<0>(); } // { dg-error "unavailable" } };
google
android
struct2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lookup/struct2.C
95
utf_8
f7cc5bba605998b587366c1cb499ac4f
// PR c++/14510 struct c {}; namespace A { int c(struct c*req); } int A::c(struct c*req) {}
google
android
koenig2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lookup/koenig2.C
140
utf_8
c44c726de3c9ebad9efc6f0268a223d3
struct S { template <typename T> void operator() (T) {} }; namespace N { S s; struct A {} a; } using N::s; void f () { s(N::a); }
google
android
using35
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lookup/using35.C
184
utf_8
5a1b99e7a9aca7fe0f8772e7b64dd739
// { dg-do compile } struct A { typedef int type; }; struct B { typedef int type; }; struct C : B { using B::type; }; struct D : A, C { using C::type; void f() { type t = 0;} };
google
android
hidden-class16
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lookup/hidden-class16.C
368
utf_8
1f90cef4dec7c40cc66289214d7ea0fe
// Origin PR c++/36019 // { dg-do compile } struct F { static const int y = 0; }; struct A { static const int x = 0; }; struct B : public A { template <typename A> static int f () { return A::x; // { dg-error "'x' is not a member of 'F'" } } }; int main () { int j = B::f<F> (); return 0; }
google
android
extern-c-redecl4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lookup/extern-c-redecl4.C
306
utf_8
7c60f81e64a51ac83c0d2dbdd26d17e7
// Origin: PR c++/41020 // { dg-options "" } // { dg-do compile } // { dg-final { scan-assembler "call\[\t \]+\[^\$\]*?_Z4forkv" { target i?86-*-* x86_64-*-* } } } class frok { int this_errno; friend int fork (void); }; void foo () { fork (); }
google
android
scope-operator1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lookup/scope-operator1.C
306
utf_8
a0c29cb4b5f7577e6f70badabcf54df5
/* PR c++/250 */ /* { dg-do compile } */ template <class T> void Bar(T *p) { } template <class T> class Foo { public: Foo(T *p) { Bar(p); } // The global scope operator wasn't respected in this case under gcc 3.0 void Bar(T *p) { ::Bar<T>(p); } }; int main() { double* d; Foo<double> f(d); }
google
android
forscope2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lookup/forscope2.C
194
utf_8
a456249cabb4263894413ab00792e156
// { dg-do compile } struct S { void foo() { for (_ptr; ;) {} // { dg-error "not declared" } _ptr = 0; } }; // It's OK to error or not on line 6. // { dg-prune-output ":6:" }
google
android
ambig4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lookup/ambig4.C
266
utf_8
763e9272cd68992e2826922e21df9b67
// PR c++/13377 // { dg-do compile } namespace N { int i; // { dg-message "i" } } int i; // { dg-message "i" } using namespace N; void foo() { i; } // { dg-error "ambiguous" }
google
android
builtin3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lookup/builtin3.C
280
utf_8
f7071ebb383c4bfa6e3d7a62fe5aeeeb
// { dg-do compile } // PR 31749: ICE with redeclaration of builtin namespace std { union abort; } void abort(); using std::abort;
google
android
delete1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lookup/delete1.C
295
utf_8
d9678387006e999bc9d29de93e894ef7
// PR c++/2136 // Test that overloaded op new and delete don't prevent us from using the // global versions with an explicit scope. #include <stddef.h> struct A { void *operator new (size_t, float); void operator delete (void *, float); }; int main () { A *p = ::new A; ::delete p; }
google
android
using31
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lookup/using31.C
97
utf_8
e9c04992b07ac04f995f7a908689c1c1
// { dg-do compile } struct H2 { int f (); }; struct J2 : H2 { struct f {}; using H2::f; };
google
android
template3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lookup/template3.C
328
utf_8
75b2b90a34407d67ae6e6b01b7e2a7f7
// Origin PR c++/47957 // { dg-do compile } struct S { int m; S() : m(0) { } }; struct Base { typedef S T; }; template<class T> struct Derived : public Base { int foo() { T a; // This is Base::T, not the template parameter. return a.m; } }; int main() { Derived<char> d; return d.f...
google
android
hidden-var1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lookup/hidden-var1.C
282
utf_8
5d85325d96326f59e7447d088f81b378
// Origin PR c++/45625 // { dg-do compile } struct Outer { static const int value = 1 ; template< int value > struct Inner { static const int* get_value() { return &value ;// { dg-error "lvalue required" } } }; }; template class Outer::Inner<2>;
google
android
crash3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lookup/crash3.C
404
utf_8
5a3dc332cf960875d43cf5a6355dfa80
// { dg-do compile } // Contributed by Wolfgang Wieser <wwieser at gmx dot de> // PR c++/15967: ICE with ambiguous operator new typedef __SIZE_TYPE__ size_t; struct A { void *operator new(size_t s){} }; // { dg-message "operator new" } struct B { void *operator new(size_t s){} }; // { dg-message "operator new" } ...
google
android
using18
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lookup/using18.C
371
utf_8
0e7bcfa3b04037051371f537fde080d3
// { dg-do compile } namespace N1 { void f (); struct f; // { dg-message "" "candidate" } } namespace N2 { void f (int); struct f; // { dg-message "" "candidate" } } namespace M { using namespace N1; using namespace N2; } using M::f; // { dg-error "ambiguous" }
google
android
two-stage1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lookup/two-stage1.C
313
utf_8
0f014086c6e90e67e8879d132fc019d6
/* PR c++/2437 */ /* { dg-do run } */ // Test of two-stage name lookup. int g(double) { return 0; } template <class T> struct X { int f() { return g(2); } // should call g(double) }; inline int g(int) { return 1; } int main() { return X<int>().f(); // should call g(double), but used to call g(int) }
google
android
koenig5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lookup/koenig5.C
1,450
utf_8
b819fd86a63b35c2e9f86a6b0832c379
// Koenig lookup is not defined as intended in the std. DR 218 gives // an indication of what is meant. This test case encapsulates the // current conservative behaviour namespace N { struct A {}; void One (...); // { dg-message "N::One" } void (*Two) (...); // { dg-message "N::Two" } namespace Three {} //...
google
android
ns1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lookup/ns1.C
152
utf_8
72c3a9b17a32af0585fa3bf9d370c39d
// PR c++/12862 typedef int Thingo; namespace A { void Thingo(); } void A::Thingo() { ; } int main() { A::Thingo(); return 0; }
google
android
linkage2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lookup/linkage2.C
97
utf_8
ca86ea8309b14f35f10e1d9671f22271
// PR c++/27227 namespace x { extern "C" const int y; } using x::y; extern "C" int const y=0;
google
android
extern-c-redecl3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lookup/extern-c-redecl3.C
435
utf_8
5625a0300bd4231d19c3998fc06661ba
// Origin: PR c++/41020 // { dg-options "" } // { dg-do compile } // { dg-final { scan-assembler-not "call\[\t \]+\[^\$\]*?_Z4forkv" { target i?86-*-* x86_64-*-* } } } // { dg-final { scan-assembler "call\[\t \]+_?fork" { target i?86-*-* x86_64-*-* } } } extern "C" int fork (void); void foo () { extern int fork (void...
google
android
crash6
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lookup/crash6.C
246
utf_8
6a38ff35a5b1440f19dcf25007f0643d
// { dg-do compile } // PR c++/18652: ICE redeclaring variable as template. int A; // { dg-message "previous declaration" } template<int> struct A; // { dg-error "different kind of symbol" }
google
android
koenig10
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lookup/koenig10.C
129
utf_8
668e482efb2099032387b8bb3bc1b61a
// Test for proper handling of class-scope enums. struct A { enum E { e }; friend void f (E); }; int main() { f(A::e); }
google
android
using30
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lookup/using30.C
164
utf_8
7d6d732595d94cc02fac2e99d8cddfe3
// { dg-do compile } struct H { typedef int type; }; struct J : H { struct type {}; // { dg-message "previous" } using H::type; // { dg-error "conflicts" } };
google
android
using6
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lookup/using6.C
220
utf_8
8db693e8a73657ac0a6ba980e910013c
// { dg-do compile } // PR c++/9022, nested namespace in using declaration namespace gnu { namespace gcc { } } using gnu::gcc; // { dg-error "namespace" }
google
android
name-clash8
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lookup/name-clash8.C
84
utf_8
f58299de078b35494d60ed1ce04894ba
// PR c++/38278 struct foo { }; void bar(); struct baz { static foo (bar)(); };
google
android
new1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lookup/new1.C
456
utf_8
1054a720e51f3308719b6df5ebdd4766
// { dg-do compile } // Origin: <igodard at rational dot com> // PR c++/2518: operator new must not be looked up in local scope int main() { int i; void* operator new(__SIZE_TYPE__ s, int* p); int* e = new(&i) int; // { dg-error "no matching function" } // { dg-message "candidate" "candidate...
google
android
two-stage2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lookup/two-stage2.C
251
utf_8
1d4d95969d27910bf0528926c351da6c
// { dg-do compile } // PR c++/2922 char& f(char); template<class T> void g(T t) { char& c1 = f(1); // not dependent char& c2 = f(t); // dependent } int&f (int); int main() { g(2); // two f(char) g('a'); // two f(char) }
google
android
ambig3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lookup/ambig3.C
455
utf_8
8a8e297ff58b448ef6aadeaf54236aa9
// { dg-do compile } // Follow on from Bug 16889:Undetected ambiguity. struct B { int f(); // { dg-message "int B::f" "" } }; struct B1 : virtual B {}; struct B2 : B {}; struct B2_2 : B2 {}; struct BB : B1, B2_2 {}; int i = BB().f(); // { dg-error "ambiguous" "" }
google
android
redecl1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lookup/redecl1.C
110
utf_8
bcba89d3ec64e8fc005f26cebc29ef75
// PR c++/14668 class A {}; // { dg-error "" } class B { static A *A; // { dg-error "" } }; A *B::A = 0;
google
android
scoped5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lookup/scoped5.C
283
utf_8
fcbd72a09a4049e1a9619d23e1f3c841
// { dg-do compile } // PR c++/10230: ICE while determining if refered non-static member // is from a base type of the current class. class A { public: class B { public: int a; }; }; class C { public: void f(void) { sizeof(A::B::a); } };
google
android
two-stage3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lookup/two-stage3.C
340
utf_8
673f5cb94e0c6c5a86bce634e4eb2be5
// { dg-do compile } // PR c++/2922 namespace tpl_ { template<class T> char test(T); template<class T> struct check { static T const t; enum { value = 1 == sizeof(test(t)) }; }; double test(int); } bool const two_phase_lookup_supported = tpl_::check<int>::value; int compile_time_assert[two_phase_lookup_s...
google
android
hidden-class15
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lookup/hidden-class15.C
399
utf_8
6b2f9f53913c945910efe2221ea59402
// Origin PR c++/36019 // { dg-do compile } struct F { static const int y = 0; }; struct A { static const int x = 0; }; struct B : public A { template <typename A> struct C { static int f () { return A::x; // { dg-error "'x' is not a member of 'F'" } } }; }; int main () { int j = B::C<F>...
google
android
used-before-declaration
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lookup/used-before-declaration.C
183
utf_8
484cce6ae499098e15620d91582e9470
void f() { g(); } // { dg-error "not declared" "" } void g() { }
google
android
ambig5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lookup/ambig5.C
271
utf_8
dbba00ef334068fd19de1479525fdb7e
// PR c++/13377 // { dg-do compile } namespace N { namespace M {} // { dg-message "M" } } namespace M {} // { dg-message "M" } using namespace N; using namespace M; // { dg-error "namespace-name|ambiguous" }
google
android
koenig7
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lookup/koenig7.C
137
utf_8
aad2c467c14168ed79e3c1e65b775cb4
// PR c++/34870 template <typename T> struct Foo { friend void func(const Foo &) {} }; void check(const Foo<int> & x) { func(x); }
google
android
name-clash9
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lookup/name-clash9.C
147
utf_8
67876a2ad3dba5614a3166e45fda64bb
// { dg-do compile } // PR c++/48010 struct A { struct type {}; // { dg-message "previous" } typedef int type; // { dg-error "conflicts" } };
google
android
using36
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lookup/using36.C
403
utf_8
739104fb841c8b8833dc8d018e2fef4c
// PR c++/25994 // { dg-do run } struct B1 { void f (char) {} void f (double) { __builtin_abort(); } }; struct B2 { void f (double) { __builtin_abort(); } void f (int) {} }; struct D : public B1, public B2 { using B1::f; using B2::f; void g () { f ('a'); // should call B1::f(char) f...
google
android
name-clash6
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lookup/name-clash6.C
364
utf_8
19bf0a8e5c085192ed95ae9e19b5e7a7
// { dg-do compile } // C++ Standard, 3.3, clause 4: // "[Note: a namespace name or a class template name must be unique in its // declarative region (7.3.2, clause 14). ]" class N; // { dg-message "previous declaration" } namespace N { // { dg-error "redeclared" } }
google
android
using44
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lookup/using44.C
377
utf_8
c843e5ad7d2c007c878ebf8f92cafe32
// PR c++/30195 // { dg-do run } template <class T> struct B { void foo(char) { __builtin_abort(); } void foo(short) { __builtin_abort(); } void foo(T) {} }; template<class T> struct Out { struct D : B<T>, B<double> { using B<T>::foo; using B<double>::foo; void bar() { foo(3); } }; }; int ...
google
android
scoped1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lookup/scoped1.C
422
utf_8
7f5cd88f36ee85ad8858de6c3ee35d51
// Test that explicitly scoped references to static members work even if // they belong to an inaccessible base. struct A { static int i1; int i2; // { dg-error "inaccessible" "" } static void f1 (); void f2 (); }; struct B: private A { }; struct C: public B { void g () { ::A::i1 = 1; ::A::i2 = 1;...
google
android
using23
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lookup/using23.C
119
utf_8
c860cb0eb295ebcb219fbcb0357233e3
// PR c++/50742 typedef int A; void f(int i) { switch (i) { case 0: using ::A; default:; } }
google
android
strong-using-4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lookup/strong-using-4.C
127
utf_8
1591da0decee2f87beb828b2a559d801
// PR c++/16301 // { dg-do compile } namespace NS2 { using namespace NS1 __attribute__ ((strong)); // { dg-error "" } }
google
android
member1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lookup/member1.C
109
utf_8
87fc629e5c4d461f8b0b8d07b9e85a50
// PR c++/14186 struct Base { enum { Derived }; }; class Derived : public Base { Derived(); };
google
android
koenig11
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lookup/koenig11.C
133
utf_8
b9e805fb75a33ef1129f6679048f585f
// Test that we treat unions like other classes in arg-dep lookup. union U { friend void f (U); }; int main() { U u; f(u); }
google
android
main1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lookup/main1.C
32
utf_8
6438f8158c9b2b3fffe8884a62ce29af
struct main {}; int main () {}
google
android
hidden-class1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lookup/hidden-class1.C
213
utf_8
7cbc76b65ea52678814739292360a219
// { dg-do compile } class A { friend class B; B *b; // { dg-error "type|expected" } };
google
android
using52
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lookup/using52.C
147
utf_8
c215c3d00f87b59d1c59614eaf8713ea
// { dg-do compile } // PR c++/52645 class A { protected: struct B {}; }; class C : A { protected: using A::B; struct D : public B {}; };
google
android
ns2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lookup/ns2.C
113
utf_8
8fad00e146fe0525b4a78080a95a7ca8
// PR c++/18161 namespace m { namespace n { } } namespace n { } namespace o { namespace n = ::m::n; }
google
android
conv-1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lookup/conv-1.C
505
utf_8
6050742dc94dc2938a38db83c24e67d0
// { dg-do compile } // Failed to spot ambiguous conversion struct A1 { operator int () const; // { dg-message "A1::operator" "" } }; struct A2 { operator int () const; // { dg-message "A2::operator" "" } }; struct B : A1, A2 { }; int Foo (B const &b) { return b; // { dg-error "ambiguous" "" } // { dg-message...
google
android
extern-c-redecl
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lookup/extern-c-redecl.C
418
utf_8
d7fd3568f7492df0e27753b13c1be48f
// Origin: PR c++/13699 // { dg-do compile } namespace A { extern "C" void foo_func () throw(); // { dg-error "conflicts" } } // next line should trigger an error because // it conflicts with previous declaration of foo_func (), due to // different exception specifications. extern "C" void foo_func (); // { dg-erro...
google
android
using16
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lookup/using16.C
475
utf_8
e7fbce9353160bae4a47b06190926fc5
// { dg-do compile } namespace M { struct S {}; // { dg-message "struct M::S" "candidate 1" } } namespace N { int S; struct S {}; // { dg-message "struct N::S" "candidate 2" } } using namespace M; using namespace N; struct ::S s; // { dg-bogus "ambiguous.*ambiguous" "duplicate error" } // { dg-error "reference to...
google
android
hidden-temp-class2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lookup/hidden-temp-class2.C
248
utf_8
590a6df7b77021d1b70c7714b823d85b
// { dg-do compile } class A { template <class T> friend class B; }; class B* b; // { dg-error "argument required|invalid" }
google
android
java2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lookup/java2.C
1,137
utf_8
c640da1e1f515bb2b0001b9266b2da05
// { dg-do compile } // { dg-options "-fdollars-in-identifiers" } // Origin: Giovanni Bajo <giovannibajo at libero dot it> // Make sure that Java special functions can be called correctly. // (continue from java1.C) extern "Java" { typedef __java_int jint; namespace java { namespace lang { class Cl...
google
android
friend7
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lookup/friend7.C
421
utf_8
825ad6385b6944ed35c3c48ad981441e
// { dg-do compile } // PR c++/7874: Don't inject friend functions into global name space. namespace N { template<typename T> struct A { friend void f(A) { } }; } int main() { N::A<int> a; N::f(a); // { dg-error "not a member" } } struct S { friend void g(); friend void h(S); }; struct T { friend void g(); fri...
google
android
typedef1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lookup/typedef1.C
320
utf_8
8bcdfec3b2bc3c59b46d319647268367
// PR c++/33516 // { dg-do compile } struct S1; typedef S1 T1; struct S1 { typedef int U; T1::U i; }; struct S2; typedef S2 T2; struct S2 { typedef int U; }; T2::U j; struct S3; typedef S3 T3; struct S3 { typedef int U; S3::U i; }; void foo () { S1 s1; S2 s2; S3 s3; s1.i = 6; j = 7; s3.i = 8; }
google
android
using34
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lookup/using34.C
141
utf_8
7fd16175a5f6566e80b1cd5bf3c48c6d
// { dg-do compile } struct A { int f (); }; struct B : A { using A::f; struct f {}; void g() { f(); struct f ff; } struct f ff; };
google
android
koenig4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lookup/koenig4.C
398
utf_8
634eca78a66aff86cb1d96384411430c
// { dg-do compile } // Incorrect koenig lookup struct A {}; struct B { static void foo(); static void bar(const A &); }; void bar(const A &){} void B::foo () { A a; bar (a); }
google
android
scoped7
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lookup/scoped7.C
319
utf_8
36c8df686ba39d71b24a97d15b78bcba
//PR c++/11507 //The new parser used to fail on this. // { dg-do compile } namespace NS { void foo(bool arg1); } namespace M { namespace K { bool Bc(bool x); } void bar() { NS::foo (K::Bc(true)); // GCC could not find K or Bc. } }
google
android
anon3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lookup/anon3.C
114
utf_8
563e134d27e728c49412fd9e968a6cd8
// Test that anonymous unions work with explicit scope. static union { int i; }; int main() { return ::i; }
google
android
exception1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lookup/exception1.C
491
utf_8
9c3013e710b3fee0c4c57b37e6edc002
/* PR 2743 */ /* { dg-do compile } */ namespace ns { class Exception { }; } namespace ns { class Test { public: inline Test() throw( Exception ); inline Test(int n ) throw( Exception ); private: int i; }; } // This line used to fail because Exception wasn't looked up in the // rig...
google
android
conv-3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lookup/conv-3.C
385
utf_8
5ea2bf1f15c014fc72f6b7b8c42b05e8
// { dg-do compile } // { dg-final { scan-assembler "_ZNK2A1IiEcviEv" } } template <typename T> struct A1 { operator T () const; // this one }; struct A2 : A1<int> { template<typename T> operator T () const; }; int Foo (A2 const &b) { return b; }
google
android
friend15
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lookup/friend15.C
153
utf_8
28e2ce08101f172201fae40376cee3c3
// Origin: PR c++/35109 // { dg-do compile } void foo() { struct A { friend class B; }; B::B() {} // { dg-error "has not been declared" } }
google
android
class-member-1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lookup/class-member-1.C
256
utf_8
ccc3c25dd361d4449e0d183046beace3
struct A { }; int main() { A a; a.i = 9; // { dg-error "no member" "" } }
google
android
friend10
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lookup/friend10.C
236
utf_8
6379d610cdb9d3f95e70e88bdbaf87f7
// PR c++/18681 // Bug: The friend declaration in A failed to give C::D access to A::B // as specified in DR 45. class A { struct B; friend class C; }; class C { struct D { void f(); }; }; void C::D::f() { A::B* p; }
google
android
name-clash3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lookup/name-clash3.C
168
utf_8
81599e15173d111c32e196e35a6bc5ed
// { dg-do compile } // PR c++/12102 struct A { struct C {} C; }; struct B : A { struct C {} C; };
google
android
friend4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lookup/friend4.C
377
utf_8
96ad222df48d0097eb84d66dbf37d17d
// { dg-do compile } // Friend name lookup in class defined outside its namespace // (Local class case) void f() { class A { class B; class C; }; class A::B { friend class C; typedef int i; }; class A::C { A::B::i j; }; }
google
android
ptrmem1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lookup/ptrmem1.C
163
utf_8
f30dda31dee159f3aebbbc269a5fd8e4
struct A { virtual void f (); }; struct B : public A { }; struct C : public A { }; struct D : public B, C { virtual void f (); }; void (D::*p)() = &D::f;
google
android
koenig8
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lookup/koenig8.C
253
utf_8
0ee15856109c227606e584330302e620
// PR c++/42026, DR 239 // The local extern declaration prevents arg-dependent lookup. // { dg-do link } namespace NS { class T { }; void g(T, int); } NS::T parm; void g(NS::T, float) { } int main() { extern void g(NS::T, float); g(parm, 1); }
google
android
hidden-class5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lookup/hidden-class5.C
212
utf_8
119a917c19b63d6f8318c460b2fe7e77
// { dg-do compile } class A { friend class B; }; B* b; // { dg-error "type|expected" }
google
android
using41
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lookup/using41.C
339
utf_8
b30a19e7bafa9e7d872f9e48eb523485
// { dg-do compile } template <class T> struct Base { void f(); }; template <class T> struct A : Base<T> { using Base<T>::f; // { dg-message "previous declaration" } using Base<T>::f; // { dg-error "redeclaration" } }; template <class T, class U> struct B : Base<T>, Base<U> { using Base<T>::f; us...
google
android
ambig1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lookup/ambig1.C
418
utf_8
2b091ec065310fe84169c6f447b3a338
// { dg-do compile } // Bug 16889:Undetected ambiguity. struct B { int f(); // { dg-message "int B::f" "" } }; struct B1 : virtual B {}; struct B2 : B {}; struct BB : B1, B2 {}; int i = BB().f(); // { dg-error "ambiguous" "" }
google
android
using38
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lookup/using38.C
304
utf_8
08082049df0cf8bf9a41e050253cf8f6
// { dg-do compile } // PR c++/6936 struct Baser { enum { j, i }; // { dg-error "inaccessible" } }; struct Base : Baser { static void j(); static void i(); }; struct Derv : Base { using Baser::j; private: using Baser::i; }; int k = Derv::j; int l = Derv::i; // { dg-error "context" }
google
android
anon4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lookup/anon4.C
62
utf_8
57709e2c9e6767a799d8af24fcd9fa61
static union { int i; }; int *ip; void g() { ip = &i; }
google
android
koenig13
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lookup/koenig13.C
219
utf_8
13b993a64fc2cc91de616884657a007a
// PR c++/42687 // DR 705 namespace N { struct S { }; void f(const S &) { } } void f(const N::S &) { } int main() { N::S v; (f)(v); // no ambiguity: ADL is prevented with (), only ::f is considered }
google
android
hidden-temp-class8
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lookup/hidden-temp-class8.C
266
utf_8
7329bb8e573ed03d12f2ea0f32cdb168
// { dg-do compile } class A { template <class T> friend class B; }; class C { friend class B; // { dg-error "argument required|friend" } };
google
android
using-10
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lookup/using-10.C
304
utf_8
37ba62633a35db58ce53d2e965c7405c
// PR c++/13659 // { dg-do compile } namespace foo1 { template <class T> void f(T); } namespace foo2 { template <class T> void f(T, T); } namespace foo { using namespace foo1; using namespace foo2; } // Make sure we bring in both declarations. using foo::f; int main() { f(1); f(1, 1); }
google
android
using8
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lookup/using8.C
362
utf_8
05105c11218492c8a6c6943b32a316ec
// { dg-do compile } // Origin: Bill Clarke <llib at computer dot org> // PR c++/11097: using declartion for a converter operator to a nested class // in a base type template <typename T> struct A { struct Nested {}; operator Nested*(); }; template <typename T> struct B : A<T> { using A<T>::operator typename A...
google
android
using22
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lookup/using22.C
260
utf_8
ddb95e89fa0dec0bbd065160a0fd5f62
// PR c++/39786 namespace A { char (*f(char *p))[13] { return 0; } } namespace B { namespace C { char (*f(int p))[42] { return 0; } } using namespace C; } using namespace B; using namespace A; char x[sizeof *::f(0) == 42 ? 1 : -1];
google
android
struct-hack1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lookup/struct-hack1.C
602
utf_8
14a5eeccea742bec62851ac5c1d69945
// { dg-do compile } MEM_ENUM (d) MEM_ENUM (e) MEM_ENUM (f) MEM_ENUM (g) MEM_ENUM (h) MEM_ENUM (i) MEM_ENUM (j) MEM_ENUM (k) MEM_ENUM (l) MEM_ENUM (m) MEM_ENUM (n) MEM_ENUM (o) MEM_ENUM (p) MEM_ENUM (q) MEM_ENUM (r) MEM_ENUM (s) MEM_ENUM (t) MEM_ENUM (u) MEM_ENUM (v) MEM_ENUM (w)...
google
android
using12
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lookup/using12.C
80
utf_8
4aa371c96c095ece93ba36b9aa1ab516
// PR c++/16707 int i; using N::i; // { dg-error "'N' has not been declared" }