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
name-clash2
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/name-clash2.C
208
utf_8
924d0b82f921fb6c61ded452d74242a8
// { dg-do compile } // PR c++/9777 struct A { struct X {}; struct Y { void X(); }; }; struct B : A { struct Y : A::Y {}; struct X : A::X {}; };
google
chromium
ambig2
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/ambig2.C
412
utf_8
fa1ea4ed4c9f1ae996929481bd6de67c
// { dg-do compile } // Bug 16889:Undetected ambiguity. struct B { int i; // { dg-error "int B::i" "" } }; struct B1 : virtual B {}; struct B2 : B {}; struct BB : B1, B2 {}; int i = BB().i; // { dg-error "ambiguous" "" }
google
chromium
extern-c-redecl
.C
native_client/nacl-gcc/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
chromium
new2
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/new2.C
432
utf_8
9acfc8706a0bca23685ea80c9dd6b524
// { dg-do compile } // Reject [de-]allocation functions declared in a namespace, or // declared as static. namespace A { void* operator new(__SIZE_TYPE__ s, int* p); // { dg-error "namespace" } void operator delete(void*); // { dg-error "namespace" } } static void* operator new(__SIZE_TYPE__ s,...
google
chromium
conv-4
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/conv-4.C
494
utf_8
a96892a658bcb84c3b0bb4a492c464f0
// { dg-do compile } // { dg-final { scan-assembler "_ZNK1AcviEv" } } // { dg-final { scan-assembler-not "_ZNK1VcviEv" } } struct V { operator int () const; }; struct A : virtual V { operator int () const; // this one }; struct B1 : A, virtual V { }; struct B2 : virtual V, A { }; int Foo (B1 const &b) { return b...
google
chromium
builtin2
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/builtin2.C
472
utf_8
d4887e959260b7f96317369d69134b6c
/* { dg-do compile } */ /* PR c++/21087 */ /* We used to overload the template function with the built-in declaration, instead of replacing it as we should, and then barf at the using decl because of a test that none of the overload set members were anticipated built-ins. */ extern "C" signed int toupper(s...
google
chromium
hidden-class12
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/hidden-class12.C
272
utf_8
5d84f55cadb94cac360a5e9fb5bafea4
// Origin PR c++/36019 // { dg-do compile } struct F { static const int x = 0; }; struct A { template <typename A> static int f () { return A::x; } }; int main () { int i = A::f<F> (); return i; }
google
chromium
hidden-temp-class2
.C
native_client/nacl-gcc/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
chromium
using3
.C
native_client/nacl-gcc/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
chromium
hidden-class4
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/hidden-class4.C
191
utf_8
4015bc4983ffa5738cd73a7e693ab292
// { dg-do compile } class A { friend class B; }; class B *b; B *c;
google
chromium
using17
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/using17.C
380
utf_8
dd59f2bb89f048e870e421f5370dda96
// { dg-do compile } namespace M { struct S {}; // { dg-error "struct M::S" "candidate 2" } } int S; struct S {}; // { dg-error "candidates are: struct S" "candidate 1" } using namespace M; struct S s; // { dg-error "reference to 'S' is ambiguous|invalid type in declaration" "" }
google
chromium
builtin4
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/builtin4.C
298
utf_8
6296f0916fc8d5d3cd5a9b99cd2637aa
// { dg-do compile } // PR 31749: ICE with redeclaration of builtin namespace std { union abort; } union abort; using std::abort; // { dg-error "" }
google
chromium
conv-5
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/conv-5.C
312
utf_8
0e3bdcba06a0b268451ab07419fa8b6a
// { dg-do compile } struct A { template<typename T> operator T() const; operator float() const; };
google
chromium
scoped2
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/scoped2.C
295
utf_8
b7a658adf99cb82ba017f02f1f2411c6
// { dg-do compile } // Seg faulted. struct Base { }; struct Derived : Base { void Foo () { Base::Baz (); // { dg-error "is not a member" "" } } };
google
chromium
ambig3
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/ambig3.C
453
utf_8
0e636168c26983f9ef884688bb4917e7
// { dg-do compile } // Follow on from Bug 16889:Undetected ambiguity. struct B { int f(); // { dg-error "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
chromium
linkage2
.C
native_client/nacl-gcc/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
chromium
linkage1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/linkage1.C
95
utf_8
dd2bb2db635688dfaa0a377453d94638
// DR 563 extern int i; // { dg-error "linkage" } extern "C" int i; // { dg-error "linkage" }
google
chromium
scoped8
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/scoped8.C
338
utf_8
3e552c46db2cd7ace6c2daed0711e289
// { dg-do compile } // PR c++/10371: Incorrect tree node built in // finish_non_static_data_member. struct A { int i; // { dg-error "object missing" } }; template <int> struct B { int foo() { return A::i; } // { dg-error "this location" } }; template struct B<0>;
google
chromium
using2
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/using2.C
1,392
utf_8
d90e987aac9e605de005cd0954d5b976
// { dg-do compile } namespace N { template<int> void f() {} } using N; // { dg-error "(using-declaration)|(nested-name)" "" } using ::N; // { dg-error "using-declaration" "" } using N::f< 0 >; // { dg-error "using-declaration" "" } struct A { template <class T> void f(T); template <cla...
google
chromium
hidden-class15
.C
native_client/nacl-gcc/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
chromium
class-member-1
.C
native_client/nacl-gcc/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
chromium
strong-using-1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/strong-using-1.C
272
utf_8
7fc502120fb4ee302aaa6935aaaa66a0
// PR c++/13594 (secondary) // { dg-do compile } namespace fool { inline namespace foo { template <class T> void swap(T, T); } template <class T> void swap(T); } int main() { // we used to fail to look up the associated namespace here fool::swap(1, 1); }
google
chromium
using11
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/using11.C
90
utf_8
3b1be5c1d7f024899683d6b51a3db2aa
namespace N1 { enum e { a }; void e(char); } void f() { using N1::e; enum e x; }
google
chromium
scoped4
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/scoped4.C
244
utf_8
aa72bf12de95e37fe79a3293544473d4
/* PR c++/754 */ /* { dg-do compile } */ namespace foo { namespace bar { enum x {foo }; enum {ubit0 = 0x0001}; // Used to get a parse error before "::" token. int i=foo::bar::ubit0; } }
google
chromium
duperr1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/duperr1.C
205
utf_8
8f8bfa7911aa42a0568e9d558edea86f
// PR c++/29048 class A { int i; }; // { dg-bogus "is private.*is private" } // { dg-error "is private" "" { target *-*-* } 3 } class B:public A { B() { A::i=0; } }; // { dg-error "within this context" }
google
chromium
builtin1
.C
native_client/nacl-gcc/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
chromium
struct1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/struct1.C
410
utf_8
8837a627a3630961e92a566cca5204fa
// Various struct lookup tests. We didn't used to complain about // the definition of C. struct A; typedef struct A B; // { dg-error "previous declaration" } struct B; // { dg-error "using typedef-name" } typedef struct { int i; } C; // { dg-error "previous declaration" } struct C; // { dg-error "using typedef-...
google
chromium
hidden-temp-class7
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/hidden-temp-class7.C
281
utf_8
b85da0a6dd0281917136631542194c52
// { dg-do compile } class A { template <class T> friend class B; }; class C { template <class T> friend class B; }; B<int> *b; // { dg-error "expected" }
google
chromium
disamb1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/disamb1.C
223
utf_8
86271224c38de31ea55c228d8c440211
// PR c++/525 // Bug: With -pedantic, we weren't converting this to B1* for the call. struct A { void f(); }; struct B1: public A {}; struct B2: public A {}; struct C: public B1, public B2 { void g() { B1::f(); } };
google
chromium
nested1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/nested1.C
353
utf_8
2aad717d2580b37ccf512edb71fd54a2
// Build don't link: // // // PR c++/47 The parser failed to resolve 'B' in the return type of // A::C::D::foo. class A { public: class B; class C; }; class A::B { }; class A::C { class D; }; class A::C::D { public: B* foo(); };
google
chromium
struct-hack1
.C
native_client/nacl-gcc/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
chromium
anon6
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/anon6.C
411
utf_8
d57ca710568407046656416ea3f5eade
extern int v1; // { dg-error "declared" } static union { int v1; }; // { dg-error "redeclaration" } static union { int v2; }; // { dg-error "declared" } extern int v2; // { dg-error "redeclaration" } int v3; // { dg-error "declared" } static union { int v3; }; // { dg-error "redeclaration" } static union { int v4...
google
chromium
ns3
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/ns3.C
95
utf_8
326caa0ef916da51fec348c662a91f18
// PR c++/32898 namespace N { } int N::i; // { dg-error "should have been declared inside" }
google
chromium
template2
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/template2.C
443
utf_8
7019845dfb6dbd2d5547a6f72b822068
// { dg-do compile } // PR 10199. Lookup problems class X { public: template<int d> int bar (); }; template<int x> int fooo (); template<class T> void bar (T& g) { int kk = fooo<17>(); // OK X x; int k = x.bar<17>(); // Not OK } int main () { X x; int k=x.bar<17>(); // OK int n; bar(n); }
google
chromium
name-clash6
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/name-clash6.C
362
utf_8
157832ee86dda65a0eae71e5aee398d8
// { 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-error "previous declaration" } namespace N { // { dg-error "redeclared" } }
google
chromium
scoped6
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/scoped6.C
218
utf_8
64641117d11795558f7818829892fd86
template <typename X> class Foo { int i; public: Foo() { X::explode(); // { dg-error "" } } }; class Bar { Foo<int> foo_; public: Bar() {} // { dg-message "instantiated" } }; template class Foo<int>;
google
chromium
extern-c-redecl3
.C
native_client/nacl-gcc/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
chromium
hidden-temp-class4
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/hidden-temp-class4.C
230
utf_8
5d3c037e35a7bb1abf22ed827965735b
// { dg-do compile } class A { template <class T> friend class B; }; B<int> *b; // { dg-error "expected" }
google
chromium
hidden-class14
.C
native_client/nacl-gcc/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
chromium
koenig2
.C
native_client/nacl-gcc/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
chromium
crash5
.C
native_client/nacl-gcc/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
chromium
extern-c-redecl2
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/extern-c-redecl2.C
269
utf_8
42649607e256c4617aa495101b2c5d8c
// Origin PR c++/41020 // { dg-do compile } extern "C" { int fork (void); } class frok { int this_errno; friend int fork (void); }; extern "C" int fork (void) { frok grouped; return grouped.this_errno; }
google
chromium
anon3
.C
native_client/nacl-gcc/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
chromium
anon2
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/anon2.C
235
utf_8
6033c13175be69110fc7dd58ad6aa1da
// { dg-do compile } // { dg-options "" } // Make sure we issue a diagnostic if a type with no linkage is used // to declare a a variable that has linkage. struct { int i; } a; // { dg-warning "anonymous type" } void foo() { a.i; }
google
chromium
friend3
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/friend3.C
323
utf_8
e51e64a92ddf4c4d012cb738bf62fde5
// { dg-do compile } // Friend name lookup in class defined outside its namespace namespace A { class B; class C; } class A::B { friend class C; typedef int i; }; class A::C { A::B::i j; };
google
chromium
hidden-class2
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/hidden-class2.C
185
utf_8
1543acdebdb65876176b6415fff0ac88
// { dg-do compile } class A { friend class B; }; class B* b;
google
chromium
using-10
.C
native_client/nacl-gcc/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
chromium
name-clash8
.C
native_client/nacl-gcc/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
chromium
anon1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/anon1.C
512
utf_8
2f777984f797382f3dba7eab93665be9
// PR c++/2039 // Test that a scoped reference to a member of an anonymous union member of // a base class works properly. // { dg-do run } struct A { long ia1; union { long ia2; }; }; struct B : public A { void f1(); void f2(); }; void B::f1() { ia1 = 11; ia2 = 22; } void B::f2() { ia1 = ...
google
chromium
friend2
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/friend2.C
385
utf_8
1d1b78e141263b9b6035a3fccc6af928
// { dg-do compile } // PR c++/14513, unqualified lookup of friend class. struct S { void test (void); }; namespace NS { class X { friend class S; static int *i; // { dg-error "private" } }; } void S::test () { NS::X::i; // { dg-error "this context" } }
google
chromium
strong-using-5
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/strong-using-5.C
208
utf_8
88357a42b2384bfe2df960efb1bdd6c5
// PR c++/33486 namespace A { inline namespace B { struct T { struct U { }; U f(); }; } inline namespace C { void g (T::U); } } int main() { A::T t; g(t.f()); }
google
chromium
name-clash7
.C
native_client/nacl-gcc/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
chromium
strong-using-4
.C
native_client/nacl-gcc/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
chromium
hidden-class5
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/hidden-class5.C
207
utf_8
e7235e035c241df579f649933ff1d6a6
// { dg-do compile } class A { friend class B; }; B* b; // { dg-error "expected" }
google
chromium
hidden-class10
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/hidden-class10.C
287
utf_8
619ba3272772780b190824f7d20abf4a
// { dg-do compile } // Verify that a friend class is hidden even if it overrides a builtin // function name. class A { friend class abort; abort *b; // { dg-error "no type|expected" } };
google
chromium
koenig3
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/koenig3.C
150
utf_8
0efd4ef624e1a631dad2972522c30301
extern "C" void abort (); struct S { }; void f(S, int) { abort(); } void f(S, double) {} S s; int main() { extern void f(S, int); f(s, 3.0); }
google
chromium
main1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/main1.C
32
utf_8
6438f8158c9b2b3fffe8884a62ce29af
struct main {}; int main () {}
google
chromium
hidden-class9
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/hidden-class9.C
234
utf_8
d13c196ccdbbc4683a8238093061dcba
// { dg-do compile } namespace N { class A { friend class B; }; } using N::B; // { dg-error "declared" }
google
chromium
extern-c-redecl5
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/extern-c-redecl5.C
360
utf_8
61e0f5516fe31d2cad426334ee149b9a
// Origin: PR c++/41020 // { dg-do compile } class frok { int this_errno; friend int fork (void); // { dg-error "previous declaration .*?C\\+\\+. linkage" } }; extern "C" int fork (void) // { dg-error "conflicts with new declaration .*?C. linkage" }} { frok grouped; return grouped.this_errno; }
google
chromium
extern-c-redecl4
.C
native_client/nacl-gcc/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
chromium
ambig1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/ambig1.C
416
utf_8
f1339a059a53b8c932f6dd4870283209
// { dg-do compile } // Bug 16889:Undetected ambiguity. struct B { int f(); // { dg-error "int B::f" "" } }; struct B1 : virtual B {}; struct B2 : B {}; struct BB : B1, B2 {}; int i = BB().f(); // { dg-error "ambiguous" "" }
google
chromium
hidden-temp-class5
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/hidden-temp-class5.C
231
utf_8
5a5f41370026fd44a0bad756fb1c01f2
// { dg-do compile } class A { template <class T> friend class B; }; template <class T> class B; B<int>* b;
google
chromium
using14
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/using14.C
88
utf_8
566f22665e5dbaacccc9bab0af697314
// PR c++/21784 // { dg-options "" } namespace mine { int cpow; } using mine::cpow;
google
chromium
hidden-class11
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/hidden-class11.C
378
utf_8
d363d9de44498afed8d14153c451f6f9
// { dg-do compile } // Verify that a friend class is hidden even if it is hidden by a non-builtin // function name. namespace M { void F (void); class F; } namespace N { void F(void); class A { friend class F; }; } using namespace M; using namespace N; class F *b;
google
chromium
template1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/template1.C
527
utf_8
a793e64bb6b34881797f23d0f6a812f7
/* PR c++/3009 */ /* { dg-do run } */ // According to 14.6.2.4 of C++ Standard: // "If a base class is a dependent type, a member of that // class cannot hide a name declared within a template, or a // name from the template's enclosing scopes." class B { public: int foo() { return 1; } }; int foo() { return 0; }...
google
chromium
using19
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/using19.C
412
utf_8
2f7856e44d88c2a8a051c1b70aff3f85
// { dg-do compile } // C++ Standard, 7.3.3, clause 10: // "Since a using-declaration is a declaration, the restrictions on // declarations of the same name in the same declarative region (3.3) also // apply to using-declarations." namespace M { union A; void B(); } void A(); union B; using M::A; using M::B;
google
chromium
decl2
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/decl2.C
637
utf_8
d64551040d13bf36f94a380b6b298ea5
// { dg-do compile } // PR 9053. Failed to consider templates that are disambiguated by // return type. template <typename T> class bar; template <> struct bar<const char*> { typedef void type; }; template <typename T> class qux; template <> struct qux<int> { typedef void type; }; template <typename T> typename bar<T>:...
google
chromium
two-stage5
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/two-stage5.C
330
utf_8
55b606de81dcee47c1021a188831f526
// { dg-do run } extern "C" void abort (); namespace N { template <class T> T foo (T) { return T (); } template <class T> T bar (T t) { return foo (t); } } struct S { S (int i = 0): i_ (i) { } int i_; }; namespace N { /* template <> */ S foo (S) { return S (1); } } int main () { if (1 == N::bar (S()).i_) abo...
google
chromium
using8
.C
native_client/nacl-gcc/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
chromium
friend8
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/friend8.C
250
utf_8
55fad96206146b00439be99fa14cb114
// Test that we look up a friend declared at top level ahead of an // undeclared friend found by argument dependent lookup. // { dg-do run } int f(int) { return 0; } struct S { friend int f(char) { return 1; } }; int main () { return f('a'); }
google
chromium
using7
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/using7.C
302
utf_8
77467dc1793fcab8b0e76ff651b228b8
template <typename T, bool=T::X> struct A { int i; }; template <typename T> struct B : A<T> { // { dg-error "incomplete" } using A<T>::i; // { dg-error "incomplete" "incomplete" } // { dg-error "using" "using" { target *-*-* } 8 } }; B<void> b; // { dg-message "instantiated" }
google
chromium
new1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/new1.C
367
utf_8
5faf6b16a4f293bdee51c58c3b7dd18c
// { 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" } int* f = new int; return 0; } // { ...
google
chromium
koenig1
.C
native_client/nacl-gcc/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
chromium
koenig11
.C
native_client/nacl-gcc/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
chromium
java2
.C
native_client/nacl-gcc/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
chromium
using9
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/using9.C
675
utf_8
84fae21500136128b96742ff02db8107
// { dg-do compile } // Origin: C++ Standard Draft (7.3.3/12) // PR c++/2294: using declarations should not conflict, but only cause // an ambiguous overload set to be created. namespace B { void f(int); // { dg-message "candidates" } void f(double); // { dg-message "note" } } namespace C { void f(int); ...
google
chromium
using18
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/using18.C
367
utf_8
1444086871f0b0607a6cba4f9bcdcf10
// { dg-do compile } namespace N1 { void f (); struct f; // { dg-error "" "candidate" } } namespace N2 { void f (int); struct f; // { dg-error "" "candidate" } } namespace M { using namespace N1; using namespace N2; } using M::f; // { dg-error "ambiguous" }
google
chromium
conv-3
.C
native_client/nacl-gcc/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
chromium
forscope1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/forscope1.C
327
utf_8
c961035d55063ab35ff011e8098d8ea9
// { dg-do compile } // Bug 4206. We were nesting SCOPE_STMTs badly. struct A { A (); ~A (); }; void Go( ) { while (1) { switch (1) { default: {} } A d; } }
google
chromium
this1
.C
native_client/nacl-gcc/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
chromium
using4
.C
native_client/nacl-gcc/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
chromium
strong-using-2
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/strong-using-2.C
387
utf_8
87c39961e8a0148dd5421168a4d1b4ba
// PR c++/13594 // { dg-do compile } namespace foo { inline namespace foo_impl { class T; // { dg-error "T" "" } } } namespace bar { inline namespace bar_impl { class T; // { dg-error "T" "" } } using namespace foo; } namespace baz { using namespace foo; using namespace bar; } foo::T *t1; bar::...
google
chromium
using6
.C
native_client/nacl-gcc/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
chromium
name-clash1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/name-clash1.C
204
utf_8
6c99bf6f0c2260471ad74e39e36cdf71
// { dg-do compile } // PR c++/5402 struct A { struct B {}; }; struct C { typedef int B; }; struct D : A { struct E : C {}; struct B {}; };
google
chromium
koenig5
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/koenig5.C
1,236
utf_8
f8813acb40fd83277eefddd0f79796a2
// 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-error "conflict with" "" } void (*Two) (...); // { dg-error "not a function" "" } names...
google
chromium
friend4
.C
native_client/nacl-gcc/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
chromium
conv-2
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/conv-2.C
356
utf_8
b59dc1be1de7788c3e2134a73db76fc4
// { dg-do compile } // { dg-final { scan-assembler "_ZNK2A1cviEv" } } struct A1 { operator int () const; // this one }; struct A2 : A1 { template<typename T> operator T () const; }; int Foo (A2 const &b) { return b; }
google
chromium
hidden-class8
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/hidden-class8.C
246
utf_8
43ad4f369597420b26688a9f8ee0553a
// { dg-do compile } namespace N { class A { friend class B; }; } class N::B { // { dg-error "not name a class" } };
google
chromium
two-stage2
.C
native_client/nacl-gcc/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
chromium
error1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/error1.C
184
utf_8
01aa02d07ac01945729f0db1d362c4f2
// PR c++/17609 // { dg-do compile } namespace N { int i; } void foo() { i; } // { dg-error "not declared" } using namespace N; void bar() { i; }
google
chromium
hidden-temp-class8
.C
native_client/nacl-gcc/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
chromium
friend6
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/friend6.C
278
utf_8
f00af47e1b16d7d6e6577ae76572b806
// { dg-do compile } // PR c++/19258: Wrong lookup scope for friend defined in class. class X { template<class T> friend int ff(T*, int y=anX.x) { return y; } int f() { return ff(&anX); } static X anX; int x; }; X dummy;
google
chromium
redecl1
.C
native_client/nacl-gcc/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
chromium
crash1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/crash1.C
456
utf_8
eca250664b688ff2d60db784a03646f6
// { dg-do compile } // PR c++/11871 Regression namespace std { class A { public: enum result { ok }; }; template<typename T> class B : public A { public: typedef A::result result; }; } int main() { for(float result = 1.0;;); }
google
chromium
forscope2
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/forscope2.C
127
utf_8
0a537641a6f07027fc6b83c330555682
// { dg-do compile } struct S { void foo() { for (_ptr; ;) {} // { dg-error "not declared" } _ptr = 0; } };
google
chromium
friend7
.C
native_client/nacl-gcc/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
chromium
using12
.C
native_client/nacl-gcc/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" }
google
chromium
hidden-temp-class6
.C
native_client/nacl-gcc/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
chromium
typedef1
.C
native_client/nacl-gcc/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
chromium
java1
.C
native_client/nacl-gcc/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; ...