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
defarg1
.C
native_client/nacl-toolchain/gcc/gcc/testsuite/g++.dg/parse/defarg1.C
78
utf_8
cc3bbadad96b1783abf727940e6be572
class A { public: A(int nBits = ((int)0x8) | ((int)0x4) | ((int)0x2)); };
google
chromium
dtor15
.C
native_client/nacl-toolchain/gcc/gcc/testsuite/g++.dg/parse/dtor15.C
162
utf_8
784814c1cb95ee4da37b2ff4009fc31b
// PR c++/39225 template <class T> class A { public: A() {} ~B() {} // { dg-error "~B" } }; int main() { A<int> *a = new A<int>; return 0; }
google
chromium
crash38
.C
native_client/nacl-toolchain/gcc/gcc/testsuite/g++.dg/parse/crash38.C
482
utf_8
a2e7f97cbb653224451604ce49769c8a
/* PR c++/33207 */ /* This would not ICE. */ namespace M { } /* { dg-error "previous declaration" } */ struct M; /* { dg-error "redeclared as different kind of symbol" } */ M *p; /* { dg-error "expected constructor" } */ /* This would ICE when processing 'p'. */ namespace N { } /* { dg-error "previous declaration"...
google
chromium
ctor5
.C
native_client/nacl-toolchain/gcc/gcc/testsuite/g++.dg/parse/ctor5.C
136
utf_8
a4891aceb4e43fa4a0ccb88ea69f16c5
// PR c++/27309 struct A { int i; A() i() {} // { dg-error "expected" } }; // { dg-error "expected" } struct B { A a; }; B b;
google
chromium
parse6
.C
native_client/nacl-toolchain/gcc/gcc/testsuite/g++.dg/parse/parse6.C
348
utf_8
6f332b616f8c038758d35e02dd2d6de3
/* PR c++/3012 */ /* { dg-do compile } */ class A { public: template <class T> void foo() const { } }; template <class T> class B { public: void bar(const A& a) const { // Compile used to fail with parse error before `;' token a.foo<double>(); } }; int main() { A a; ...
google
chromium
dtor13
.C
native_client/nacl-toolchain/gcc/gcc/testsuite/g++.dg/parse/dtor13.C
187
utf_8
2f1ba051cdf0b3812fb8d4829e61a238
/* PR c++/34963 This used to ICE */ /* { dg-do "compile" } */ struct A { static friend A::~A(); /* { dg-error "storage class specifiers|extra qualification|implicitly friend" } */ };
google
chromium
pragma3
.C
native_client/nacl-toolchain/gcc/gcc/testsuite/g++.dg/parse/pragma3.C
346
utf_8
4a49daabeedfe512b8b53dfe880c235e
// PR c++/25294 // { dg-do run } extern "C" void abort (void); struct S { char a[3]; #pragma pack(1) /* A block comment that ends on the next line. */ struct T { char b; int c; } d; #pragma pack /*/ */ () // C++ comment int e; } s; int main () { if (sizeof (int) == 4 && sizeof (s) != 12) ...
google
chromium
ret-type3
.C
native_client/nacl-toolchain/gcc/gcc/testsuite/g++.dg/parse/ret-type3.C
91
utf_8
36603b3c2926b20a0727d10d5f631e75
// PR c++/21369 struct bar; template <class T> struct bar *foo (T *p) { return p->t; }
google
chromium
crash3
.C
native_client/nacl-toolchain/gcc/gcc/testsuite/g++.dg/parse/crash3.C
107
utf_8
1893d49612e9a07e189ba50eff994ac3
template <class T> struct L { struct I {}; }; template <class T> void L<T>::I::foo() {} // { dg-error "" }
google
chromium
parameter-declaration-1
.C
native_client/nacl-toolchain/gcc/gcc/testsuite/g++.dg/parse/parameter-declaration-1.C
201
utf_8
19f6aca27efa700bef4477a26d564761
// Origin: Robert Schiele; PR C++/8799 // { dg-do compile } struct { a(void = 0; a(0), a(0) // { dg-error "" "" { target *-*-* } }
google
chromium
error7
.C
native_client/nacl-toolchain/gcc/gcc/testsuite/g++.dg/parse/error7.C
157
utf_8
69f9cb5c7beb27587f6ec060eeafc314
// PR c++/12827 // { dg-options "-fshow-column" } void f(int x int y); // { dg-error "8:expected ',' or '...' before 'int'" "" { target *-*-* } 5 }
google
chromium
defarg14
.C
native_client/nacl-toolchain/gcc/gcc/testsuite/g++.dg/parse/defarg14.C
90
utf_8
010df34c714b830e2adbcaf95afdec27
// PR c++/28274 extern "C" { void foo (int i, int j = 6); void foo (int i = 4, int j); }
google
chromium
operator5
.C
native_client/nacl-toolchain/gcc/gcc/testsuite/g++.dg/parse/operator5.C
103
utf_8
447fc3e462b9b45bbf68e672e2421b3c
// PR c++/17685 struct S { operator int; // { dg-error "" } operator void; // { dg-error "" } };
google
chromium
dtor6
.C
native_client/nacl-toolchain/gcc/gcc/testsuite/g++.dg/parse/dtor6.C
142
utf_8
3356854f284ca0f7e874435f169c14b9
// PR c++/25638 struct A { ~A(); }; // { dg-error "candidate" } struct B : A { template<int> friend A::~A(); // { dg-error "match" } };
google
chromium
namespace5
.C
native_client/nacl-toolchain/gcc/gcc/testsuite/g++.dg/parse/namespace5.C
132
utf_8
057a40a6b9a4d34bfccc2e241350e8c1
// PR c++/7229 // { dg-do compile } namespace A { namespace B { typedef int type; } } typename A::B<0>::type x; // { dg-error "" }
google
chromium
no-value1
.C
native_client/nacl-toolchain/gcc/gcc/testsuite/g++.dg/parse/no-value1.C
173
utf_8
aa5411fd5e6b230e1e272f2eabca94bc
// PR c++/5533 // { dg-do compile } namespace N { template <class T> struct A{}; } template <class T> void foo(T) {} void bar() { foo(N::A); // { dg-error "" } }
google
chromium
comma2
.C
native_client/nacl-toolchain/gcc/gcc/testsuite/g++.dg/parse/comma2.C
408
utf_8
7a61c8e71deeb5afa8198794ebdf7d32
// { dg-do compile } // PR c++/24907 [3.4/4.0/4.1/4.2 Regression] "int x, ;" accepted int x; int y,; /* { dg-error "expected" } */ int main() { int a; int b,; /* { dg-error "expected" } */ int c,d; int e,f,; /* { dg-error "expected" } */ int g,h,i; int j,k,l,;/* { dg-error "expected" } */ int m,,,n; /...
google
chromium
mutable1
.C
native_client/nacl-toolchain/gcc/gcc/testsuite/g++.dg/parse/mutable1.C
94
utf_8
2a6bb7eee1c4c9ef55c8fb4a46785607
// PR c++/16518 struct foo { void bar() const { m1=1; m2=1;} mutable int m1,m2; };
google
chromium
ptrmem2
.C
native_client/nacl-toolchain/gcc/gcc/testsuite/g++.dg/parse/ptrmem2.C
299
utf_8
2f2fc795a372828b256da823dbe94a7a
// { dg-do compile } namespace A {} int A::* p; // { dg-error "is a namespace" "" }
google
chromium
crash36
.C
native_client/nacl-toolchain/gcc/gcc/testsuite/g++.dg/parse/crash36.C
429
utf_8
85f13b549293cf786d8040070afba6aa
// PR c++/32567 // { dg-do compile } // { dg-options "-std=c++98" } template <typename... T> struct A // { dg-warning "variadic templates" } { static T &t; // { dg-error "not expanded with" "not expanded" } // { dg-message "T" "T" { target *-*-* } 7 } static const int i = sizeof (++t); // { dg-error "was n...
google
chromium
crash9
.C
native_client/nacl-toolchain/gcc/gcc/testsuite/g++.dg/parse/crash9.C
296
utf_8
5818f331167c496db06ad694932a1beb
// { dg-do compile } // PR c++/10793: ICE in handling base class when the current class // contains error. template <typename> struct A {}; template <typename> struct A<INVALID> : A<int> { }; // { dg-error "not declared|invalid|token|extra" }
google
chromium
defarg6
.C
native_client/nacl-toolchain/gcc/gcc/testsuite/g++.dg/parse/defarg6.C
246
utf_8
8649c92bbc4962e03bb01e44973f0119
// { dg-do compile } // PR c++/13166: ICE default function argument for friend declaration. namespace sc_dt { class sc_length_param { friend int compare_unsigned(int if_v_signed = 0) {} }; }
google
chromium
template6
.C
native_client/nacl-toolchain/gcc/gcc/testsuite/g++.dg/parse/template6.C
405
utf_8
36ce6bc0b81d40546501089e276c612d
// { dg-do compile } // PR c++/9778. Ensure templated functions in other namespaces are // correctly instantiated. namespace NS { template <int N> void foo (); } template <int N> struct X { int m; void g () { NS::foo<sizeof(m)>(); } }; template class X<2>;
google
chromium
template5
.C
native_client/nacl-toolchain/gcc/gcc/testsuite/g++.dg/parse/template5.C
385
utf_8
eb5012efbf2e76d0649338687d64eab1
// { dg-do compile } // PR 3902. More type/decl confusion. template <class T> struct S { S foo (T (T)); S foo (T(const T&)); }; int main () { S<int> (S<int>::*pf1)(int (int)) = &S<int>::foo; S<int> (S<int>::*pf2)(int (const int&)) = &S<int>::foo; }
google
chromium
ctor8
.C
native_client/nacl-toolchain/gcc/gcc/testsuite/g++.dg/parse/ctor8.C
249
utf_8
81e65c2a9ba3aa29d6a354330d5691cb
//PR c++/28505 struct A { A : (); // { dg-error "primary-expression|incomplete type" } A : (int); // { dg-error "primary-expression|incomplete type|'int'" } }; A a = (A){0}; // { dg-error "too many initializers|compound-literals" }
google
chromium
crash18
.C
native_client/nacl-toolchain/gcc/gcc/testsuite/g++.dg/parse/crash18.C
232
utf_8
538f0f1bf0cea39406cc427e43ee96f9
struct A // { dg-error "expected" "" }
google
chromium
dtor11
.C
native_client/nacl-toolchain/gcc/gcc/testsuite/g++.dg/parse/dtor11.C
155
utf_8
9af20f2ed80bb687afac1f85d9e1dad4
// PR c++/28606 // { dg-do compile } struct A { ~A A(); // { dg-error "destructor" } }; struct B { A::~B B(); // { dg-error "as member of" } };
google
chromium
error29
.C
native_client/nacl-toolchain/gcc/gcc/testsuite/g++.dg/parse/error29.C
484
utf_8
e7346aefeb3e898d171bb325d837d809
// { dg-options "-fshow-column -ansi -pedantic-errors -Wno-long-long" } // PR c++/25637 struct A { void foo(); A(); void operator delete(void *); }; struct B { friend void A::foo() {} // { dg-error "22:cannot define member function 'A::foo' within 'B'" } friend void A::operator delete(void*) {} // { dg-er...
google
chromium
expr1
.C
native_client/nacl-toolchain/gcc/gcc/testsuite/g++.dg/parse/expr1.C
80
utf_8
d5e1867a018baeb589c4bfc1ab21e892
struct A { A (int, int); void f (); }; void f (int a) { A (a, a).f (); }
google
chromium
friend1
.C
native_client/nacl-toolchain/gcc/gcc/testsuite/g++.dg/parse/friend1.C
134
utf_8
607c4c06d2daa0d87b677b1ad9fbc84b
namespace N { template <typename T> static void f (); struct S { friend void N::f<int> (); static void f (int); }; }
google
chromium
error12
.C
native_client/nacl-toolchain/gcc/gcc/testsuite/g++.dg/parse/error12.C
540
utf_8
b5488f7dc68ae348695098345de8e977
// { dg-do compile } // Origin: Giovanni Bajo <giovannibajo at gcc dot gnu dot org> // Make sure the error about '<:' can be turned into a warning // { dg-options "-fpermissive -fshow-column" } struct B; template <class A> struct Foo {}; Foo<::B> foo; // { dg-bogus "error" "error in place of warning" } // { dg-war...
google
chromium
template12
.C
native_client/nacl-toolchain/gcc/gcc/testsuite/g++.dg/parse/template12.C
115
utf_8
7ed414cad5851726c320604ea56d95bd
template <int J> struct A { }; struct B { template <int I> struct C : public A<I> {}; typedef double I; };
google
chromium
crash47
.C
native_client/nacl-toolchain/gcc/gcc/testsuite/g++.dg/parse/crash47.C
154
utf_8
16058db49fab91cfff89097d865733fb
// PR c++/37531 // { dg-do compile } // { dg-options "-std=gnu++98" } void foo () { (int[i]) { 0 }; // { dg-error "was not declared in this scope" } }
google
chromium
template24
.C
native_client/nacl-toolchain/gcc/gcc/testsuite/g++.dg/parse/template24.C
246
utf_8
ad10de81d76fff3ac6f0d42c5b013580
/* PR c++/29731. This used to ICE in uses_template_parms. */ template<int> struct A {}; void foo() { A<({})> a; /* { dg-error "forbids braced-groups within expressions|statement-expressions|template argument 1 is invalid|invalid type" } */ }
google
chromium
namespace6
.C
native_client/nacl-toolchain/gcc/gcc/testsuite/g++.dg/parse/namespace6.C
100
utf_8
62c0e5b957973fd08ee2ce09fb2bac4a
namespace a { namespace b { void foo(); } } void a::b:foo() // { dg-error "" } { }
google
chromium
crash7
.C
native_client/nacl-toolchain/gcc/gcc/testsuite/g++.dg/parse/crash7.C
142
utf_8
34393b72e5dec85fca930dee15e2f669
struct A { int foo () const { return 0; } }; template <typename> void bar (int x[], const A &a) { const int i=a.foo(); x[i]=0; }
google
chromium
error13
.C
native_client/nacl-toolchain/gcc/gcc/testsuite/g++.dg/parse/error13.C
289
utf_8
60381da056d6f2263f2135ad61e209f3
// { dg-options "-fshow-column" } // PR c++/13975 public: // { dg-error "1:expected unqualified-id before 'public'" } int i; protected: // { dg-error "1:expected unqualified-id before 'protected'" } int j; private: // { dg-error "1:expected unqualified-id before 'private'" } int k;
google
chromium
access7
.C
native_client/nacl-toolchain/gcc/gcc/testsuite/g++.dg/parse/access7.C
297
utf_8
d44f99d0f38b43ff740e826c56b2fa80
// { dg-do compile } // PR c++/5655: Access of member redeclaration. struct S { class A; template <class T> class B; private: class A {}; // { dg-error "different access" } template <class T> class B {}; // { dg-error "different access" } };
google
chromium
struct-3
.C
native_client/nacl-toolchain/gcc/gcc/testsuite/g++.dg/parse/struct-3.C
174
utf_8
9ea0f9eb74ca962b92bb9cd0d459bc60
// PR c++/18731 struct A { struct B; typedef B C; }; struct A::C {}; // { dg-error "invalid class name" }
google
chromium
parse5
.C
native_client/nacl-toolchain/gcc/gcc/testsuite/g++.dg/parse/parse5.C
706
utf_8
932a4203218fac5bad85207fda4db468
/* PR c++/590 */ /* { dg-do compile } */ #include <iostream> #include <sstream> using namespace std; enum ExternalEnum { EXTERNAL_VALUE = 2 }; class BadStream : public ostringstream { public: enum InternalEnum { VALUE = 0 }; BadStream( InternalEnum e ) {} BadStream( InternalEnum e, int i ) {} }; int ...
google
chromium
error2
.C
native_client/nacl-toolchain/gcc/gcc/testsuite/g++.dg/parse/error2.C
638
utf_8
94d9587d190ac0343b64aea84538f38d
// { dg-do compile } // { dg-options "-fshow-column" } // Properly print CALL_EXPRs while dumping expressions double g; int func(double); template <int> struct Foo {}; Foo<func(g)> f; // { dg-error "5:'int func.double.' cannot appear in a constant-expression" "" { target *-*-* } 11 } // { dg-error "10:'g' cannot app...
google
chromium
crash20
.C
native_client/nacl-toolchain/gcc/gcc/testsuite/g++.dg/parse/crash20.C
383
utf_8
ac7acd08eefa9fb64ec98e93f66e28ca
// { dg-do compile } template<typename T> struct A { typedef typename T::X Y; // { dg-error "not a class" "" } }; A<int>::Y y; // { dg-message "instantiated from here" "" }
google
chromium
crash6
.C
native_client/nacl-toolchain/gcc/gcc/testsuite/g++.dg/parse/crash6.C
136
utf_8
3cae354cb01ecb5097fe78c4d17c8ccd
struct P {}; template <typename > struct O { struct I; }; template <typename T> struct O<T>::I::S : P {}; // { dg-error "" }
google
chromium
class1
.C
native_client/nacl-toolchain/gcc/gcc/testsuite/g++.dg/parse/class1.C
115
utf_8
b768f688a17e6fb93e41198625381298
namespace N { struct A; int f() { struct N::A { // { dg-error "" } A() {} }; return 0; } }
google
chromium
linkage3
.C
native_client/nacl-toolchain/gcc/gcc/testsuite/g++.dg/parse/linkage3.C
83
utf_8
f860807cf54031b8df626f746711d411
// PR c++/37877 // { dg-do compile } extern "C++" struct S { static int x; } s;
google
chromium
constant7
.C
native_client/nacl-toolchain/gcc/gcc/testsuite/g++.dg/parse/constant7.C
107
utf_8
e773e9fc506890dda1d6fbb37fd77ae4
// PR c++/19991 enum { e = 1 }; template<typename> struct A { static const int i = e; char a[i]; };
google
chromium
template4
.C
native_client/nacl-toolchain/gcc/gcc/testsuite/g++.dg/parse/template4.C
344
utf_8
17872444c3e507c8ec724d519d4c6457
// { dg-do compile } // PR 795. fields are not necessarily a dependent type. struct V { template<typename T> T get (); }; struct L { V v; template<typename T> T at (int i) { return v.get<T> (); } };
google
chromium
error4
.C
native_client/nacl-toolchain/gcc/gcc/testsuite/g++.dg/parse/error4.C
175
utf_8
36675870861df04d64c29e077ffed5ad
// PR c++/12160 // { dg-options "-fshow-column" } struct X { virtual void f(int, itn, int); }; // { dg-error "4:'itn' has not been declared" "" { target *-*-* } 6 }
google
chromium
parse7
.C
native_client/nacl-toolchain/gcc/gcc/testsuite/g++.dg/parse/parse7.C
424
utf_8
c203de39cbb4bd246d0e315aa6662a15
/* PR c++/3650 */ /* { dg-do compile } */ class class1 { public: explicit class1(double a) { data = a; } double data; }; class class2 { public: class2(class1 a, float t) { } class2(float t, class1 a) { } }; int main() { float t2 = 1.5; double pir = 3.14159; // Used to get: error: type specifier omit...
google
chromium
repo1
.C
native_client/nacl-toolchain/gcc/gcc/testsuite/g++.dg/parse/repo1.C
154
utf_8
15c20313893567659b867565ddb52b45
// { dg-options "-frepo" } // { dg-require-host-local "" } extern "C" inline void f() {} int main () { f(); } // { dg-final { cleanup-repo-files } }
google
chromium
class2
.C
native_client/nacl-toolchain/gcc/gcc/testsuite/g++.dg/parse/class2.C
224
utf_8
2efa6438f8b09367340ea4cfa19221cf
// PR c++/13140 struct foo { foo(); void f(); static int i; }; namespace bar { foo::foo() {} // { dg-error "namespace" } void foo::f() {} // { dg-error "namespace" } int foo::i; // { dg-error "namespace" } }
google
chromium
offsetof9
.C
native_client/nacl-toolchain/gcc/gcc/testsuite/g++.dg/parse/offsetof9.C
614
utf_8
7f291291c36ce0760b815fd17deee991
/* PR c/32041 */ /* { dg-do run } */ struct S { int c; struct { float f; } sa[2]; }; char a[__builtin_offsetof (S, sa->f) == __builtin_offsetof (S, sa[0].f) ? 1 : -1]; template <int N> struct T { int c[N]; struct { float f; } sa[N]; static int foo () { return __builtin_offsetof (T, sa->f); } stati...
google
chromium
constructor3
.C
native_client/nacl-toolchain/gcc/gcc/testsuite/g++.dg/parse/constructor3.C
230
utf_8
b22e3322a12b4a4c9247847dadcb8da6
/* PR c++/29077 */ /* { dg-do "compile" } */ class c { c(); c(const c&); ~c(); }; namespace m { c::c() {} /* { dg-error "c::c" } */ c::c(const c&) {} /* { dg-error "c::c" } */ c::~c() {} /* { dg-error "c::~c" } */ }
google
chromium
error34
.C
native_client/nacl-toolchain/gcc/gcc/testsuite/g++.dg/parse/error34.C
106
utf_8
aa5cf2a4e64629f94de3077bdf380a72
// PR c++/33465 int foo(int); void bar(double d) { foo(d)(); // { dg-error "foo\\(\\(int\\)d\\)" } }
google
chromium
namespace10
.C
native_client/nacl-toolchain/gcc/gcc/testsuite/g++.dg/parse/namespace10.C
125
utf_8
00440bee143466373a89c2be7136a42b
// PR c++/16529 namespace m {} // { dg-error "" } namespace n { namespace m {} } namespace m = n::m; // { dg-error "" }
google
chromium
inline1
.C
native_client/nacl-toolchain/gcc/gcc/testsuite/g++.dg/parse/inline1.C
67
utf_8
9326901f7db3032f59fb639815b474a6
struct f { int oo() { return (2; // { dg-error "" } } };
google
chromium
crash31
.C
native_client/nacl-toolchain/gcc/gcc/testsuite/g++.dg/parse/crash31.C
402
utf_8
4b5efce965343fb8337f7efbb2f6bf48
struct A { // { dg-error "forward declaration" } A : A; // { dg-error "expected|incomplete" } A : B; // { dg-error "not declared|incomplete" } A : A(); // { dg-error "undefined type|incomplete" } A : B(); // { dg-error "function call|incomplete" } A : A[]; // { dg-error "expected|array reference|incomplete" }...
google
chromium
ambig2
.C
native_client/nacl-toolchain/gcc/gcc/testsuite/g++.dg/parse/ambig2.C
446
utf_8
3942d08ed7cbdaac837b06646132916e
// { dg-do compile } // PR 9212. We erroneously accepted an ill-formed // function-declaration, rather than a variable initializer. struct A { enum E { e }; A(E); }; struct B { enum F { f }; B(F); }; struct C { C(A, B, A); }; C c(A(A::e), B(B::f), A(A::e)); // This is not a function declaration
google
chromium
offsetof2
.C
native_client/nacl-toolchain/gcc/gcc/testsuite/g++.dg/parse/offsetof2.C
165
utf_8
9a737c5aa8c1d7760aab812e2a279d4e
#include <cstddef> struct choke_me { int size; char storage[1]; }; struct offset_is_broken { static const int offset = offsetof(choke_me, storage); };
google
chromium
template13
.C
native_client/nacl-toolchain/gcc/gcc/testsuite/g++.dg/parse/template13.C
130
utf_8
7924a1b2da1b7232beca4fef69edff0b
// PR c++/14002 template <typename T> void foo (T x) { x; } void bar() { foo(0); } struct A { friend void foo<int> (int); };
google
chromium
template7
.C
native_client/nacl-toolchain/gcc/gcc/testsuite/g++.dg/parse/template7.C
73
utf_8
9d8fc7cacf35614d028c3c92df825236
template <int I> void f(); void g() { f<(3, 2)>(); } // { dg-error "" }
google
chromium
crash52
.C
native_client/nacl-toolchain/gcc/gcc/testsuite/g++.dg/parse/crash52.C
69
utf_8
5f07107c9f99fbf5a60fd8c4a755fba1
// PR c++/39053 void foo() = // { dg-error "initialized|expected" }
google
chromium
namespace3
.C
native_client/nacl-toolchain/gcc/gcc/testsuite/g++.dg/parse/namespace3.C
194
utf_8
b2cbb96c1cb51b252c9cad30717d2f28
/* PR c+/3816 */ /* { dg-do compile } */ namespace A {} namespace OtherNamespace { typedef struct { int member; } A; // used to conflict with A namespace } // end of namespace
google
chromium
new2
.C
native_client/nacl-toolchain/gcc/gcc/testsuite/g++.dg/parse/new2.C
266
utf_8
64b1e63a6365adba9545b7d7ccede989
// { dg-do compile } // Contributed by David Daney <daney at gcc dot gnu dot org> // PR c++/14181: Cryptic error message for ill-formed new expressions void f1(void) { (void)new (char*)[10]; // { dg-error "parenthesized|parentheses" } (void)new char*[10]; }
google
chromium
array-size1
.C
native_client/nacl-toolchain/gcc/gcc/testsuite/g++.dg/parse/array-size1.C
229
utf_8
daf5f5fa938643351cbd008ccc3bb60f
// PR c++/38 // { dg-do compile } template <int i> struct A { static const int n = 1; typedef double X[n]; A (const X&); }; template <int i> A<i>::A (const X&) {}
google
chromium
template21
.C
native_client/nacl-toolchain/gcc/gcc/testsuite/g++.dg/parse/template21.C
140
utf_8
ca027049d03c823ef24752d15bc8e3a6
// PR c++/28211 template <const int*> class Helper { }; const int foo = 0; typedef Helper<&foo> HelperType; // { dg-error "linkage|type" }
google
chromium
new4
.C
native_client/nacl-toolchain/gcc/gcc/testsuite/g++.dg/parse/new4.C
105
utf_8
eef8c677d4ba7576d1abc34640929821
// PR c++/29291 // { dg-do compile } template<int> void foo() { new int(; // { dg-error "before" } }
google
chromium
ptrmem3
.C
native_client/nacl-toolchain/gcc/gcc/testsuite/g++.dg/parse/ptrmem3.C
310
utf_8
67912a62c1c6def2348fa74a9f9f5549
// Bug 19895: ICE on invalid template<typename> struct A { int A<0>::* p; // { dg-error "(type/value mismatch)|(expected)" "" } };
google
chromium
namespace-definition
.C
native_client/nacl-toolchain/gcc/gcc/testsuite/g++.dg/parse/namespace-definition.C
173
utf_8
8f491718233bf66bea91944d8a3fa4c1
// PR 30891 // { dg-do compile } int main() { int i = 0; namespace foo { // { dg-error "'namespace' definition is not allowed here" } int j = 0; } return 0; }
google
chromium
error3
.C
native_client/nacl-toolchain/gcc/gcc/testsuite/g++.dg/parse/error3.C
503
utf_8
33558eea45dbddc97de999a9839566c8
// { dg-options "-fshow-column" } // PR c++/10779 static void InstantiateConstraint(const float&, unsigned, void(*AddFunction)(const TYPE&,bool&, char*, char*, unsigned*)); // { d...
google
chromium
ptrmem5
.C
native_client/nacl-toolchain/gcc/gcc/testsuite/g++.dg/parse/ptrmem5.C
93
utf_8
f52d554c8ba213f3b2dd46e6ec8cf1e3
// PR c++/27806 struct A {}; void foo() { p; // { dg-error "p" } extern int A::* p; }
google
chromium
access5
.C
native_client/nacl-toolchain/gcc/gcc/testsuite/g++.dg/parse/access5.C
287
utf_8
3e4e9ea9709b48a4df6ec069a601569d
// { dg-do compile } // PR c++/11174: Access checking on pointer to member data. struct A { protected: int a; // { dg-error "protected" } }; struct B : A { void foo() { (void)&A::a; // { dg-error "this context" } } };
google
chromium
asm3
.C
native_client/nacl-toolchain/gcc/gcc/testsuite/g++.dg/parse/asm3.C
98
utf_8
231816ebf0d1f8c23a7446536f02f2fa
//PR c++/30851 void foo() { asm ("%[x]" : [0](x)); // { dg-error "numeric constant|token" } }
google
chromium
access4
.C
native_client/nacl-toolchain/gcc/gcc/testsuite/g++.dg/parse/access4.C
349
utf_8
d54cb72662bc4bea267f01e625b4ca68
// { dg-do compile } // PR c++/11174: Access checking of pointer-to-member function class A { protected: void foo() {} // { dg-error "protected" } public: A(); }; class B : public A { void bar() { A a; void (A::*pmf)() = &A::foo; // { dg-error "this context" } (a.*pmf)(); } };
google
chromium
builtin2
.C
native_client/nacl-toolchain/gcc/gcc/testsuite/g++.dg/parse/builtin2.C
59
utf_8
d8b50f7519f0c33caf6717bf07e5c8ae
// PR c++/14432 // { dg-options "" } struct Y {}; Y y1;
google
chromium
direct-initialization-2
.C
native_client/nacl-toolchain/gcc/gcc/testsuite/g++.dg/parse/direct-initialization-2.C
295
utf_8
a406f4dfcc4d1199effdd47c1f57d137
// { dg-do compile } struct A { A(int) { } }; struct B { typedef B T; B(A, char**) {} }; int main(int argc, char** argv) { B::T t(A(argc), argv); }
google
chromium
tmpl-tmpl-param1
.C
native_client/nacl-toolchain/gcc/gcc/testsuite/g++.dg/parse/tmpl-tmpl-param1.C
334
utf_8
e4f4b43529be2f0b5495a04aa36578d0
// PR c++/7259 // { dg-do compile } template <template <int> class T> class A : public T<0> {}; template <typename> struct B { template <int> class C {}; typedef A<C> D; }; B<void>::D d;
google
chromium
parse3
.C
native_client/nacl-toolchain/gcc/gcc/testsuite/g++.dg/parse/parse3.C
186
utf_8
ff890ffbfd3db90a7d3926194ad4927e
/* PR c++/80 */ /* { dg-do compile } */ /* Used to get: bug.C:7: semicolon missing after declaration of `numbers' */ enum numbers { zero, one, two, three } __attribute__ ((packed)) ;
google
chromium
error6
.C
native_client/nacl-toolchain/gcc/gcc/testsuite/g++.dg/parse/error6.C
262
utf_8
63e8aad45732f206c51c98cba20f5535
// PR c++/10603 // { dg-options "-fshow-column" } int f(int not) { return 1-not; } // { dg-error "11:expected ',' or '...' before '!' token" "" { target *-*-* } 4 } // { dg-error "15:expected primary\\-expression before ';' token" "" { target *-*-* } 5 }
google
chromium
crash32
.C
native_client/nacl-toolchain/gcc/gcc/testsuite/g++.dg/parse/crash32.C
177
utf_8
d803021f22dfc38b8a134bf943ae1777
// { dg-do compile } struct Visitor; struct Ast { virtual void accept (Visitor& v); }; void Ast::accept (Visitor& v) { v (*this); // { dg-error "no match for call" "" } }
google
chromium
undefined3
.C
native_client/nacl-toolchain/gcc/gcc/testsuite/g++.dg/parse/undefined3.C
190
utf_8
6e1b295c76607b6498e4d28f8752eeb8
// PR c++/5657 // { dg-do compile } template<typename T> struct A { A(B); }; template<typename T> A<T>::A(B) {} // { dg-error "" }
google
chromium
using3
.C
native_client/nacl-toolchain/gcc/gcc/testsuite/g++.dg/parse/using3.C
446
utf_8
ac80fae137a8a1ef9021d6e173ca8090
// { dg-do compile } // PR c++/11794. Using decl in nested classes of a template class template <typename T> struct a { struct a1: T { using T::aa; a1() { aa = 5; } }; }; struct b { int aa; }; template <> struct a<int>::a1 { a1 () {} }; a<b>::a1 a_b; a<int>::a1 a_i;
google
chromium
error11
.C
native_client/nacl-toolchain/gcc/gcc/testsuite/g++.dg/parse/error11.C
3,222
utf_8
1c5397b3ba3e02f1c27153b2fc9b9a67
// { dg-do compile } // { dg-options "-fshow-column" }" // Origin: Giovanni Bajo <giovannibajo at gcc dot gnu dot org> // Try to find out when the digraph '<:' is used as a mistake, and parse it // correctly to avoid cascaded errors. struct B; template <class A> struct Foo { template <class T> struct Nested {...
google
chromium
qualified3
.C
native_client/nacl-toolchain/gcc/gcc/testsuite/g++.dg/parse/qualified3.C
157
utf_8
322abe6d2d840b6218ecf16b70637d21
// PR c++/18466 int ::i; // { dg-error "" } void ::f(); // { dg-error "" } namespace N { int N::j; // { dg-error "" } void N::g(); // { dg-error "" } }
google
chromium
undefined4
.C
native_client/nacl-toolchain/gcc/gcc/testsuite/g++.dg/parse/undefined4.C
290
utf_8
be0c14c201a30f9cc491685549d8902d
// PR c++/5665 // { dg-do compile } template<typename T> class A { class B { X foo(); }; // { dg-error "" } }; template<typename T> X A<T>::B::foo() {} // { dg-error "" }
google
chromium
qualified1
.C
native_client/nacl-toolchain/gcc/gcc/testsuite/g++.dg/parse/qualified1.C
151
utf_8
ee6ac3b84366a978a8fd11d55b342fb7
struct A {}; struct B : public A { static void foo (); }; template <typename T> struct C { C() : f(B::foo) {} void (*f)(); }; C<int> c;
google
chromium
long1
.C
native_client/nacl-toolchain/gcc/gcc/testsuite/g++.dg/parse/long1.C
314
utf_8
8af90d5b10beafe61974e1e52c872741
// PR c++/6634 // { dg-do compile } // { dg-options "" } long long double x; // { dg-error "long long" } long double y; long float z; // { dg-error "long" } typedef short void SV; // { dg-error "short" } typedef long struct A LA; // { dg-error "long" } typedef short char SC; // { dg-error "short" }
google
chromium
stack1
.C
native_client/nacl-toolchain/gcc/gcc/testsuite/g++.dg/parse/stack1.C
364
utf_8
26b1b9df5ec9177a6c137833bf34a120
/* PR c/2161: parser stack overflow. */ /* { dg-do compile } */ #define ONE else if (0) { } #define TEN ONE ONE ONE ONE ONE ONE ONE ONE ONE ONE #define HUN TEN TEN TEN TEN TEN TEN TEN TEN TEN TEN #define THOU HUN HUN HUN HUN HUN HUN HUN HUN HUN HUN void foo() { if (0) { } /* 11,000 else if's. */ THOU THOU THO...
google
chromium
try-catch-1
.C
native_client/nacl-toolchain/gcc/gcc/testsuite/g++.dg/parse/try-catch-1.C
313
utf_8
fe312b5e22af7a61d39446fc1257d020
// The problem was that g++ was ICE because // it was deferring an NULL pointer because // it should have been taking the operand 1 // instead of the chain in finish_fname_decls. void fun() try { __FUNCTION__; } catch (...) {}
google
chromium
parens2
.C
native_client/nacl-toolchain/gcc/gcc/testsuite/g++.dg/parse/parens2.C
295
utf_8
0f3dcfdbce26ce78daa93488bd7ef0a1
/* PR c++/8842. */ /* { dg-do compile } */ int main( int argc, char* argv[] ) { int i = 5; // This always worked: // double l1 = double(int(i)) / double(int(i)); // But this used to give a parse error before the `/' token: double l2 = (double(int(i)) / double(int(i))); }
google
chromium
defarg4
.C
native_client/nacl-toolchain/gcc/gcc/testsuite/g++.dg/parse/defarg4.C
455
utf_8
acfa06861c017963f9c07523acb57fdf
// { dg-do compile } // PR c++ 9162. default args got left unprocessed struct S { friend int foo (const S&, int = 100); }; S s; int i = foo (s); struct R { template <typename T> R (T, int = 0); }; int Foo () { R s (1); } template <typename T> struct Q { int Foo (T, int = 0); }; int Foo (Q<int> *s) { s->Foo (1...
google
chromium
undefined2
.C
native_client/nacl-toolchain/gcc/gcc/testsuite/g++.dg/parse/undefined2.C
179
utf_8
0d9c002feba0c28525ef93144889e786
// PR c++/9173 // { dg-do compile } class A {}; class B { void foo(int,A::X); // { dg-error "" } }; void B::foo(int,A::X) {} // { dg-error "" }
google
chromium
non-dependent1
.C
native_client/nacl-toolchain/gcc/gcc/testsuite/g++.dg/parse/non-dependent1.C
242
utf_8
d3d5c74c2536d2bbc64765e6108f9905
// PR c++/8921 // { dg-do compile } struct A { template <typename T> void foo(); }; template <typename T> void bar(A& a) { a.foo<T>(); } void baz() { A a; bar<int>(a); }
google
chromium
constant3
.C
native_client/nacl-toolchain/gcc/gcc/testsuite/g++.dg/parse/constant3.C
88
utf_8
18865792b57aa709f57045520da4abd5
const int i = 1; const int j (2); const int k = { 3 }; enum { a = i, b = j, c = k };
google
chromium
struct-4
.C
native_client/nacl-toolchain/gcc/gcc/testsuite/g++.dg/parse/struct-4.C
160
utf_8
5c99d023743f75026fc610f7e5ba91d0
/* PR c/35437 */ /* { dg-do "compile" } */ struct A { int i; struct A a; /* { dg-error "has incomplete type" } */ }; void foo() { struct A b = { 0 }; }
google
chromium
error21
.C
native_client/nacl-toolchain/gcc/gcc/testsuite/g++.dg/parse/error21.C
329
utf_8
846c6f61dbc6e84dc0fd697533b320e3
// PR c++/17393 // { dg-options "-Wall -fshow-column" } struct A { }; void foo() { // Check that we do not complain about an unused // compiler-generated variable. A& = a; // { dg-error "6:expected unqualified-id before '=' token" "6" } // { dg-error "8:'a' was not declared in this scope" "8" { target *-*-* }...
google
chromium
cond4
.C
native_client/nacl-toolchain/gcc/gcc/testsuite/g++.dg/parse/cond4.C
380
utf_8
2b89c868d5f6925718dfd16fdc5617c6
// PR c++/38635 // { dg-do compile } void foo() { if (st...
google
chromium
namespace7
.C
native_client/nacl-toolchain/gcc/gcc/testsuite/g++.dg/parse/namespace7.C
123
utf_8
059e0fc868f6615aaaf4b5242b1b4c34
namespace O { struct SO; namespace I { struct SI; struct O::SO {}; // { dg-error "" } } struct I::SI {}; }
google
chromium
ambig3
.C
native_client/nacl-toolchain/gcc/gcc/testsuite/g++.dg/parse/ambig3.C
344
utf_8
dccd55557e6e7045693056e69f389dc4
// PR c++/9452 // { dg-do compile } template <int> struct A { static const int i = 1; }; template <int> struct B {}; template <typename> int foo(B<0>) { return 0; } template <typename, int j> B<A<j>::i-1> foo(B<j>) { return B<0>(); } int main() { return foo<int>(B<0>()); }
google
chromium
lookup5
.C
native_client/nacl-toolchain/gcc/gcc/testsuite/g++.dg/parse/lookup5.C
393
utf_8
4a4f9f20e51d1aee172658f8ba701b5e
// { dg-do compile } struct A {}; template <class T> struct B { T a, b; B() {} B(T x, T y) : a(x), b(y) {} template <class U> operator B<U> () const { return B<U>((U)(this->a), (U)(this->b)); } }; template <class T> struct C : public B<int> { T *c; inline T & operator *() { return *c; } }; template <c...