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
using5
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/lookup/using5.C
355
utf_8
e6b9eddad8d672688c883ca8af446a66
// { dg-do compile } // PR c++/10554: ICE for member using declaration with failed // scope name lookup. template <typename> struct A { typedef A X; void foo(); }; template <typename T> struct B : A<T> { using X::foo; // { dg-error "declared|nested-name-specifier|non-member" } };
google
chromium
koenig8
.C
native_client/pnacl-gcc/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
chromium
koenig10
.C
native_client/pnacl-gcc/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
chromium
hidden-class13
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/lookup/hidden-class13.C
301
utf_8
a4858648c41c9b0f1ca44a59f37fd567
// Origin PR c++/36019 // { dg-do compile } struct F { static const int x = 0; }; struct B { template <typename B> struct C { static int f () { return B::x; } }; }; int main () { int j = B::C<F>::f (); return 0; }
google
chromium
crash2
.C
native_client/pnacl-gcc/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
chromium
hidden-temp-class11
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/lookup/hidden-temp-class11.C
253
utf_8
4ccdb617ff78279d83f998edb37cd393
// { dg-do compile } namespace N { class A { template <class T> friend class B; }; } using N::B; // { dg-error "declared" }
google
chromium
using
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/lookup/using.C
294
utf_8
e787b658f008402e539125d8744f57b8
// { dg-do compile } struct X { }; struct Y { }; struct Z { }; struct Base { X f() { return X(); } Y f() const { return Y(); } }; struct Derived : Base { using Base::f; Z f(int) { return Z(); } }; int main() { Derived d; X x = d.f(); // { dg-bogus "Y" "" } }
google
chromium
template3
.C
native_client/pnacl-gcc/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
chromium
name-clash5
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/lookup/name-clash5.C
362
utf_8
8fde82d1ece56dc506b9b499c0bd4a81
// { 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). ]" namespace N { // { dg-error "previous declaration" } } class N; // { dg-error "redeclared" }
google
chromium
ambig4
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/lookup/ambig4.C
262
utf_8
20277ca7e96e342bdcbe0d7dd189cf10
// PR c++/13377 // { dg-do compile } namespace N { int i; // { dg-error "i" } } int i; // { dg-error "i" } using namespace N; void foo() { i; } // { dg-error "ambiguous" }
google
chromium
scoped1
.C
native_client/pnacl-gcc/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
chromium
two-stage4
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/lookup/two-stage4.C
418
utf_8
1b8c33d621d2aea028aa0ce6b0b904fe
template<class T> struct wrap {}; template<typename T> bool& operator==(wrap<T>, wrap<T>); template<typename T> void g(T, wrap<wrap<int> > x) { bool& b = x == x; // { dg-bogus "invalid initialization of reference" "" { xfail *-*-*} } } template<typename T> int& operator==(wrap<wrap<T> >, wrap<wrap<T> >); void h() { ...
google
chromium
koenig4
.C
native_client/pnacl-gcc/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
chromium
friend13
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/lookup/friend13.C
88
utf_8
d5d8f8802b06ec8909b759d46c8931c7
// PR c++/37558 class Foo { friend class Bar; friend void func(const class Bar*); };
google
chromium
delete1
.C
native_client/pnacl-gcc/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
chromium
koenig12
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/lookup/koenig12.C
305
utf_8
b4c9a3125082aac3aa6b866492a89640
// PR c++/41305 // We got into infinite recursion instantiating the B<U> series. template <class T> struct A { }; template <class T, class U = A<T> > struct B; template <class T> struct C { }; template <class T, class U> struct B: C<B<U> > { friend void f(B) { } }; B<int> b; int main() { f(b); }
google
chromium
using20
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/lookup/using20.C
240
utf_8
34b648eaba9957205d7e624281bc2ac1
// PR c++/40476 namespace A { int i; // { dg-error "i" } } using namespace A; namespace B { namespace B2 { int i; // { dg-error "i" } } using namespace B2; } using namespace B; int j = ::i; // { dg-error "ambiguous" }
google
chromium
class-member-2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/lookup/class-member-2.C
102
utf_8
150d0e731cb43b0a2d8a3416484aa2a0
template <typename T> struct A { void foo () const {} char A; }; void bar() { A<void>().foo(); }
google
chromium
crash3
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/lookup/crash3.C
400
utf_8
2d694db02bac816df7c429ac8b59c18f
// { 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-error "operator new" } struct B { void *operator new(size_t s){} }; // { dg-error "operator new" } stru...
google
chromium
friend15
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/lookup/friend15.C
211
utf_8
fae4eaba1e6de9479d99c7509ff74578
// Origin: PR c++/35109 // { dg-do compile } void foo() { struct A { friend class B; }; B::B() {} // { dg-error "has not been declared" } // { dg-error "expected" "expected" { target *-*-* } 10 } }
google
chromium
name-clash3
.C
native_client/pnacl-gcc/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
chromium
builtin5
.C
native_client/pnacl-gcc/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
chromium
using22
.C
native_client/pnacl-gcc/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
chromium
friend1
.C
native_client/pnacl-gcc/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
chromium
member1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/lookup/member1.C
109
utf_8
87fc629e5c4d461f8b0b8d07b9e85a50
// PR c++/14186 struct Base { enum { Derived }; }; class Derived : public Base { Derived(); };
google
chromium
using15
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/lookup/using15.C
153
utf_8
dc21e16250c98c89c5aa0d520799c564
// PR c++/27933 // { dg-do compile } template<int> struct A { int i; A() { using i; } // { dg-error "nested-name-specifier|declared" } }; A<0> a;
google
chromium
builtin3
.C
native_client/pnacl-gcc/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
chromium
ns2
.C
native_client/pnacl-gcc/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
chromium
hidden-class7
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/lookup/hidden-class7.C
244
utf_8
5254cbd01cec16e4a319c480050dca29
// { dg-do compile } class A { friend class B; }; class C { friend class B; }; B *b; // { dg-error "type|expected" }
google
chromium
used-before-declaration
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/lookup/used-before-declaration.C
183
utf_8
484cce6ae499098e15620d91582e9470
void f() { g(); } // { dg-error "not declared" "" } void g() { }
google
chromium
anon5
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/lookup/anon5.C
340
utf_8
f6ed60ec36721bb21df4b4b0a445bcff
// PR c++/28409 // shouldIbevisible should be emitted because it's an extern "C" decl with // external linkage, even though it's in the anonymous namespace. namespace { extern "C" int shouldIbevisible() { return 0; } } namespace t { extern "C" int shouldIbevisible(void); } int main(void) { return t::sh...
google
chromium
exception1
.C
native_client/pnacl-gcc/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
chromium
crash7
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/lookup/crash7.C
112
utf_8
ab5c5a242a635b12bd7f567d048700f4
// PR c++/35323 // { dg-options "" } void foo(int); void bar() { foo(1r); // { dg-error "not supported" } }
google
chromium
struct2
.C
native_client/pnacl-gcc/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
chromium
crash6
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/lookup/crash6.C
244
utf_8
ed885784cc184f53bc0506c07dec604c
// { dg-do compile } // PR c++/18652: ICE redeclaring variable as template. int A; // { dg-error "previous declaration" } template<int> struct A; // { dg-error "different kind of symbol" }
google
chromium
friend12
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/lookup/friend12.C
162
utf_8
633091cdd3ac488ec10917d42e7f1b0c
// PR c++/34912 void foo() { struct A { friend void bar(); // { dg-error "without prior declaration" } }; bar(); // { dg-error "not declared" } }
google
chromium
hidden-temp-class10
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/lookup/hidden-temp-class10.C
284
utf_8
50ab8034359fc3eea96c1920bf38c853
// { dg-do compile } namespace N { class A { template <class T> friend class B; }; } template <class T> class N::B { // { dg-error "not name a class" } };
google
chromium
ns4
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/lookup/ns4.C
188
utf_8
b16d2b44bfa0aeed86e99a04f412703d
// PR c++/43145 // { dg-do link } namespace N { void f(); } void N::f() { extern int i; extern void g(); i = 1; g(); } namespace N { int i; void g() { } } int main() { }
google
chromium
using21
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/lookup/using21.C
193
utf_8
de5435c6fdaa42a8c943f90be9019ea7
// PR c++/40799 namespace Bar { typedef int A; } class CollectionDeleteGuard { public: CollectionDeleteGuard(int); }; CollectionDeleteGuard::CollectionDeleteGuard(int) { using Bar::A; }
google
chromium
friend14
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/lookup/friend14.C
277
utf_8
12ea946975f9ac153ba628a157f55a5a
// PR c++/35109 struct C; void f() { struct A { friend struct B; friend struct C; void g() { B *b; // { dg-error "not declared" } C* c; // OK, finds ::C } }; C *c; // OK, finds ::C struct B {}; B *b; // OK, now it isn't hidden }
google
chromium
scope-operator1
.C
native_client/pnacl-gcc/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
chromium
name-clash2
.C
native_client/pnacl-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/pnacl-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/pnacl-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
koenig7
.C
native_client/pnacl-gcc/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
chromium
new2
.C
native_client/pnacl-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/pnacl-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/pnacl-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/pnacl-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/pnacl-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/pnacl-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/pnacl-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/pnacl-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/pnacl-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/pnacl-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/pnacl-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/pnacl-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/pnacl-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
hidden-var1
.C
native_client/pnacl-gcc/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
chromium
linkage1
.C
native_client/pnacl-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/pnacl-gcc/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
chromium
using2
.C
native_client/pnacl-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/pnacl-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/pnacl-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/pnacl-gcc/gcc/testsuite/g++.dg/lookup/strong-using-1.C
293
utf_8
2b1b09d91910d20eece0379cd7533859
// PR c++/13594 (secondary) // { dg-options "" } // { 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/pnacl-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/pnacl-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/pnacl-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/pnacl-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/pnacl-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/pnacl-gcc/gcc/testsuite/g++.dg/lookup/hidden-temp-class7.C
286
utf_8
c9817628c80c566a7294b70afca6d827
// { dg-do compile } class A { template <class T> friend class B; }; class C { template <class T> friend class B; }; B<int> *b; // { dg-error "type|expected" }
google
chromium
disamb1
.C
native_client/pnacl-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/pnacl-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
koenig9
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/lookup/koenig9.C
316
utf_8
69e76e666a1dd7169928c50d3683e7f4
// Test for sensible handling of template-ids with arg-dep lookup. // This is still an open issue. namespace N { struct A { }; void f(void (*)(int, N::A)); } namespace M { struct B { }; void f(void (*)(B, N::A)); } template <class T> void g(T, N::A); void g(); int main() { f(g<int>); f(g<M::B>); }
google
chromium
struct-hack1
.C
native_client/pnacl-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/pnacl-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
koenig13
.C
native_client/pnacl-gcc/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
chromium
ns3
.C
native_client/pnacl-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/pnacl-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/pnacl-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/pnacl-gcc/gcc/testsuite/g++.dg/lookup/scoped6.C
214
utf_8
d0e63df38adea95bde4f29a4a8adbd7a
template <typename X> class Foo { int i; public: Foo() { X::explode(); // { dg-error "" } } }; class Bar { Foo<int> foo_; public: Bar() {} // { dg-message "required" } }; template class Foo<int>;
google
chromium
suggestions1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/lookup/suggestions1.C
388
utf_8
af851aa99e053824fac72b6ad0793b03
// { dg-do compile } namespace N { namespace M { int foo; } } // { dg-message "N::M::foo" } int f (void) { return N::foo; } // { dg-error "not a member" } // { dg-message "suggested alternative" "missing namespace" { target *-*-* } 4 } int g (void) { return ::foo; } // { dg-error "not been declared" } // { dg-messa...
google
chromium
extern-c-redecl3
.C
native_client/pnacl-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/pnacl-gcc/gcc/testsuite/g++.dg/lookup/hidden-temp-class4.C
235
utf_8
7ca07a7aabef6641f43ec3e1fe52ee65
// { dg-do compile } class A { template <class T> friend class B; }; B<int> *b; // { dg-error "type|expected" }
google
chromium
hidden-class14
.C
native_client/pnacl-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/pnacl-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/pnacl-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/pnacl-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/pnacl-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/pnacl-gcc/gcc/testsuite/g++.dg/lookup/anon2.C
245
utf_8
ce55341d8c9c67e8e366abf6328acf2f
// { dg-do compile } // { dg-options "-std=c++98" } // 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/pnacl-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/pnacl-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/pnacl-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/pnacl-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/pnacl-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/pnacl-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/pnacl-gcc/gcc/testsuite/g++.dg/lookup/strong-using-5.C
230
utf_8
81170031ad2a38d5f6c077134ed385f1
// PR c++/33486 // { dg-options "" } 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/pnacl-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/pnacl-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/pnacl-gcc/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" }