plateform stringclasses 1
value | repo_name stringclasses 2
values | name stringlengths 1 78 | ext stringclasses 2
values | path stringlengths 15 1.11k | size int64 1 8.55M | source_encoding stringclasses 11
values | md5 stringlengths 32 32 | text stringlengths 0 8.49M |
|---|---|---|---|---|---|---|---|---|
google | android | t36 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/t36.C | 79 | utf_8 | c84f5cedd02a6127c6506cfa331391da | // { dg-do assemble }
void * foo () {
typedef int * ip;
return new ip;
}
|
google | android | t28 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/t28.C | 209 | utf_8 | 9d1a90d478f9d7cd8e7147d1688c25ca | // { dg-do assemble }
template <class X> class B;
template <class X> int f (B<X> b) { return 37; }
template <class Y> class B { public: Y y; B() { y = 1; } };
int foo () {
B<double> bd;
return f(bd);
}
|
google | android | memtemp97 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/memtemp97.C | 254 | utf_8 | d79149c2006aa1786cb67b94840b5231 | // { dg-do run }
template <class T> struct A {
template <class U> int f(U) { return 1; }
};
template <>
template <class U>
int A<int>::f(U) { return 0; }
A<int> a;
int main ()
{
return a.f (3);
} |
google | android | syntax2 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/syntax2.C | 906 | utf_8 | e9efff2b62f9ddbce9f908fa384b7346 | // { dg-do assemble }
// and several others. With templates, it's very easy to say something
// erroneous like
// template class X::X<whatever>
// The culprit
// ... class X::X ...
// caused us to ICE as we got confused about pushing and popping scopes.
template <class T> class image
{
public:
template <cla... |
google | android | memtemp29 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/memtemp29.C | 460 | utf_8 | 3773ce18b307505136a6c017bbaa1a63 | // { dg-do link }
// GROUPS passed templates membertemplates
extern "C" int printf(const char*, ...);
template <class X>
struct S
{
template <class U>
void f(U u);
template <class U>
void g(U u);
int c[16];
};
template <class X>
template <class U>
void S<X>::f(U u)
{ printf ("In S::f(U)\n"); g(u); }
t... |
google | android | t25 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/t25.C | 185 | utf_8 | ec5573413f4479dbdb630a4ea84a00f9 | // { dg-do assemble }
template <class X> int f (X x, X y) { return 23; }
template <class X> int f (X x, int j = 3) { return 29; }
int foo () {
return f (7); // { dg-bogus "" }
}
|
google | android | crash28 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/crash28.C | 360 | utf_8 | 9e89022ff5ab0c1955aa55ce136aa0a3 | // { dg-do assemble }
// { dg-options "" }
template <class ARRY>
inline unsigned int asize(ARRY &a) // { dg-message "note" }
{
return sizeof(a) / sizeof(a[0]);
}
void f(unsigned int n) {
int x[n];
asize(x); // { dg-error "" } no matching function
// { dg-message "(candidate|not a valid template argument)" "... |
google | android | explicit43 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/explicit43.C | 176 | utf_8 | 184b236b46a59d664ba7e3994d3e14fe | // { dg-do run }
extern "C" void abort(void);
void F(int)
{
}
void F(double)
{
abort();
}
template <void (*F)(int)>
void g()
{
(*F)(3);
}
int main()
{
g<&F>();
}
|
google | android | crash1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/crash1.C | 228 | utf_8 | dd98e99fef875456445a8b55b18ded46 | // { dg-do assemble }
template<class T> class A {
public:
class subA {};
};
template<class T> class B : public A<T> {
public:
class subB : public A::subA {}; // { dg-error "" } not a class or namespace
};
|
google | android | explicit8 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/explicit8.C | 229 | utf_8 | 806f7bed100d3c85b1d3aeb57a11dda9 | // { dg-do assemble }
// GROUPS passed templates
template <class T, class U>
void foo(T t, U u);
template <class U>
void foo(double, U) {}
void baz()
{
foo<const char*>(3.0, "abc");
foo<const char*, double>("abc", 3.0);
}
|
google | android | ttp2 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/ttp2.C | 169 | utf_8 | 91ae82c96542c91f95c0377f8bf9d606 | // { dg-do assemble }
template<class E> class D
{
};
template<template<class> class D,int> class C
{
};
int main()
{
C<1,D> c; // { dg-error "" } args not match
}
|
google | android | friend16 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/friend16.C | 284 | utf_8 | e1eba9a36090551a60c4cd568e8fe66d | // { dg-do assemble }
template <class T>
class S2
{
public:
static void f();
};
template <class U>
class S1
{
template <class T>
friend class S2;
static int i;
};
template <class T>
void S2<T>::f()
{
S1<T>::i = 3;
}
void g()
{
S2<double>::f();
S2<char>::f();
}
|
google | android | shadow1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/shadow1.C | 187 | utf_8 | 7259c6f6b64b40712386f6548cabea8e | // { dg-do assemble }
template <class T>
struct S {
typedef T X;
class C {
typedef T X;
};
};
template <int I>
struct S2 {
enum { A = I };
void f() {
int A;
}
};
|
google | android | memtemp82 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/memtemp82.C | 235 | utf_8 | da317d4362dac970d00f3f8d92723e35 | // { dg-do assemble }
struct foo {
template<typename T> T bar() { return staticbar<T>( this ); }
template<typename T> static T staticbar( foo* ) { return 0; }
};
void f()
{
foo t;
int k = t.bar<int>();
}
|
google | android | nontype1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/nontype1.C | 206 | utf_8 | 22146705d28493584966b2adcc263c57 | // { dg-do assemble }
template<int N_length>
struct B
{
B();
~B();
};
template<class P, int N>
struct D
{
D(int r0);
D(B<N-1> &, int);
};
template<class T>
void func()
{
D<T,1> tmp;
}
|
google | android | bad-type | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/bad-type.C | 220 | utf_8 | 1adb535176b9d881aafd1bb9dc833b29 | // { dg-do assemble }
template<class Type>
class A
{
public:
Type m;
};
template<class Type>
void f(A<Type>& a, Type d)
{
A.m=d; // { dg-error "" } invalid use of template
}
int main()
{
A<int> a;
f(a,2);
}
|
google | android | instantiate6 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/instantiate6.C | 460 | utf_8 | f2223ecadbce71d436c96099b2d7bbac | // { dg-do link }
// { dg-options "-frepo" }
// { dg-require-host-local "" }
// { dg-skip-if "dkms are not final links" { vxworks_kernel } }
template <class T>
class foo{
public:
void g();
void h();
};
template <class T>
void foo<T>::g() {
h();
}
template <class T>
void foo<T>::h() {
}
int main() {
foo<int> f;
... |
google | android | t05 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/t05.C | 304 | utf_8 | 951cfa1826e7735f15108d6e66c5d9e9 | // { dg-do assemble }
template <class A> class B { // { dg-message "note" }
A a;
public:
B(A&aa); // { dg-message "note" }
~B();
};
static B<int> b_int (3); // { dg-error "no matching function" }
// { dg-message "candidate" "candidate note" { target *-*-* } 9 }
|
google | android | instantiate7 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/instantiate7.C | 389 | utf_8 | d98d69ee99fb3f74d27827ff24fb8b3c | // { dg-do assemble }
template <class T>
void Wibble (void (*fn) (), T *const __restrict__ &p2)
{}
template<class T1, class T2>
void Wibble (T1 *const __restrict__ &p1, T2 *const __restrict__ &p2)
{}
void Baz ();
void Foo (void const *ptr)
{
Wibble (&Baz, ptr);
} |
google | android | friend28 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/friend28.C | 453 | utf_8 | 8bbd75ea6a9a3c6b41028f5cc386f6aa | // { dg-do assemble }
class mystream;
template <class T> class a;
template <class T> mystream& operator>>( mystream& s, a<T>& thea );
template <class T> class a {
public:
friend mystream& operator>> <>( mystream&, a<T>& thea );
private:
T amember;
};
template<> mystream& operator>> <int>( mystream& s, a<int>& t... |
google | android | typename18 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/typename18.C | 266 | utf_8 | f4323b2d5d5f2e0cf747bedf0fdf70e0 | // { dg-do assemble }
// { dg-options "" }
void X();
template <class T>
struct J {
typedef T X;
};
template <class T>
struct S {
typedef T X;
struct I : public J<X> {
static X* f();
};
};
S<int> si; |
google | android | enum | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/enum.C | 261 | utf_8 | d40150664de8eb0bbab1f8ae93675776 | // { dg-do assemble }
// GROUPS passed enums
template<class T>
struct templ
{
enum { val = 0 };
};
struct Foo
{
enum {
bar = 0,
len = templ<int>::val
};
};
void func()
{
int s = Foo::bar; // Ensure that expansion of templ did not erase bar
}
|
google | android | memtemp40 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/memtemp40.C | 270 | utf_8 | 68b96f4cc3fab5540612e908ed84335f | // { dg-do assemble }
// GROUPS passed templates membertemplates
template <class T>
struct R
{
template <class U>
void g(U u) {}
};
template <class T>
struct S
{
template <class U>
void f(U u) { R<T> r; r.g(u); }
};
void foo()
{
S<int> si;
si.f("abc");
}
|
google | android | memtemp89 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/memtemp89.C | 336 | utf_8 | 3622e749d3d34c66c2675e8a7d4702b2 | // { dg-do assemble }
class Q {
template<class T>
class X { // { dg-error "" } Q::X private
};
};
template<template<class> class XX>
class Y {
XX<int> x_;
};
Y<Q::X> y; // { dg-error "" } required from here |
google | android | instantiate5 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/instantiate5.C | 522 | utf_8 | d9a0eaaa98a929b13cc2a5f883260640 | // { dg-do link }
// { dg-additional-sources " instantiate5.cc instantiate5-main.cc" }
// `global constructors' are given the same name, based on foo(), on
// both translation units, which is wrong, because it must be possible
// to define template functions in multiple translation units, as long
// as they're given t... |
google | android | memtemp52 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/memtemp52.C | 283 | utf_8 | 3092bc8ef7502fa2629c4b00133dd79f | // { dg-do assemble }
// GROUPS passed templates membertemplates
template<class T, int N>
class A { };
template<int N>
struct X {
template<class T2, int N2>
void f(A<T2,N>&, A<int,N2>&)
{ }
};
void foo()
{
X<3> x;
A<char*, 3> a1;
A<int, 2> a2;
x.f(a1, a2);
}
|
google | android | ttp30 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/ttp30.C | 417 | utf_8 | 3dd7d697357c99241e1d464855ae966f | // { dg-do run }
template<class T> class D
{
public:
int f();
};
template<class T> int D<T>::f()
{
return sizeof(T);
}
extern "C" void abort();
template<template<class> class D,class E> class C
{
D<E> d;
public:
int f() { abort(); return 0; }
};
template<class E> class C<D,E>
{
D<E> d;
public:
int f(... |
google | android | memclass4 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/memclass4.C | 452 | utf_8 | 5b606b807bf311106ed8968ee6b98b01 | // { dg-do run }
#include <typeinfo>
template <class T>
struct allocator {
typedef T* pointer;
template <class U> struct rebind {
typedef allocator<U> other;
};
};
template <class T, class Allocator>
struct alloc_traits
{
typedef typename Allocator::template rebind<T>::other allocator_type;
};
i... |
google | android | virtual4 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/virtual4.C | 387 | utf_8 | e1cc1d4ff1313d69ebd028c0a9df75bb | // { dg-do run }
struct B
{
B ();
virtual void f () = 0;
};
B::B ()
{
}
extern B* bp;
template <class T>
struct C : public B
{
virtual void f ()
{
}
};
template <class T>
struct D : public B
{
virtual void f ()
{
bp = new C<T*>;
}
};
B* bp = new D<int>;
int main ()
{
bp->f ();
bp-... |
google | android | typename8 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/typename8.C | 353 | utf_8 | 9c3e8ae2e6e8b639408d4f27e46a23ce | // { dg-do assemble }
template < class T > class A
{
public:
typedef typename T::myT anotherT; // { dg-error "" } undefined type
anotherT t;
A() { }
A(anotherT _t) {
t=_t;
}
anotherT getT() {
return t;
}
};
class B : public A< B > // { dg-error "" } forward declaration
{
public:
typedef in... |
google | android | ttp31 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/ttp31.C | 401 | utf_8 | 5f123e63e7f82c710a78560e26acc28a | // { dg-do run }
template<class T> class D
{
public:
int f();
};
template<class T> int D<T>::f()
{
return sizeof(T);
}
extern "C" void abort();
template<template<class> class D,class E> class C
{
D<E> d;
public:
int f() { abort(); return 0; }
};
template<template <class> class F> class C<F,int>
{
F<int>... |
google | android | lookup4 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/lookup4.C | 218 | utf_8 | 42986431ad9b15940c229226d6ec4a86 | // { dg-do assemble }
void h(int);
template <class T>
class i {};
struct B
{
int i;
};
template <class T>
struct D : public B
{
void f();
void g() { h(i); }
};
template <class T>
void D<T>::f()
{
h(i);
}
|
google | android | array1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/array1.C | 302 | utf_8 | 8f389b607e60e20702fac8c00986634f | // { dg-do run }
template <class T, unsigned N>
unsigned size(T (&)[N]) { return N; }
template <class T, unsigned N>
unsigned size(T const (&)[N]) { return N; }
int main() {
short iarray[] = { 1, 2, 3, 4, 5 };
const short carray[] = { 1, 2, 3, 4, 5 };
return size(iarray) - size(carray);
}
|
google | android | error3 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/error3.C | 353 | utf_8 | 69934beb5853875136b70df407860519 | // { dg-do assemble }
// Bug 1606. We sorry'd issuing an error.
struct A {};
template <class T = A> class Tpl {};
struct B {
Tpl<int> s;
};
void foo (B *ptr)
{
ptr->Tpl.t (); // { dg-error "" } template as expression
} |
google | android | explicit65 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/explicit65.C | 363 | utf_8 | eb933f81dcd66316a1f88bca5cc66d82 | // { dg-do run }
extern "C" void abort ();
template <class T> void f ()
{
abort ();
}
template <> void f<char> ()
{
abort ();
}
template <class T> void f (int)
{
abort ();
}
template <> void f<char> (int)
{
}
template <class T> class C
{
friend void f<char> (int);
public:
void ff () { f<char> (0); }... |
google | android | explicit20 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/explicit20.C | 176 | utf_8 | ed3e49ada2c20af6865aee37d8b15d44 | // { dg-do assemble }
// GROUPS passed templates
template <class T>
T foo(T t);
template <>
int foo<char>(char c); // { dg-error "" } does not match any template declaration
|
google | android | instantiate3 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/instantiate3.C | 129 | utf_8 | d312822e3a0567debe161e80a9852c67 | // { dg-do assemble }
template <class T>
struct S
{
S(const T&) {}
S(int, long);
};
template S<double>::S(const double&);
|
google | android | friend5 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/friend5.C | 144 | utf_8 | fa9d23d193f4b405787db50998ee1850 | // { dg-do run }
class C
{
template <class T>
friend void f(T)
{
C c;
c.i = 3;
}
int i;
};
int main()
{
f(7);
}
|
google | android | explicit52 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/explicit52.C | 300 | utf_8 | 4cd1d9265d589b5a805457f30ca5ccc4 | // { dg-do run }
extern "C" void abort ();
template <int a> inline int fact ()
{
return a * fact<a-1> ();
}
template <> inline int fact<1> ()
{
return 1;
}
int main()
{
if (fact<3> () != 6 || fact<1> () != 1
|| fact<3> () != 6 || fact<1> () != 1 || fact<1+0> () != 1)
abort ();
}
|
google | android | static9 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/static9.C | 281 | utf_8 | 6e11a4161127a251dd4e656f70f7bb7b | // { dg-do assemble }
template <class T>
struct S {
int i;
};
template <class T>
struct X {
static S<T> s[];
};
template <class T>
S<T> X<T>::s[] = {
{ 3 }
};
struct Z {};
void f(S<Z>* s);
void g()
{
f (X<Z>::s);
} |
google | android | crash30 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/crash30.C | 355 | utf_8 | acf4b3be0fecc691751cb7785e03caae | // { dg-do assemble }
extern "C" int printf(const char *, ...);
template <class T> struct A {
typedef typename T::X B; // { dg-error "" } not a class
A(double);
};
template <class T> void xxx(typename A<T>::B);
template <class T> struct B {
friend void xxx<T>(T); // { dg-error "" } does not match any templa... |
google | android | conv1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/conv1.C | 212 | utf_8 | 39f08277505df0f4dda7bde601ff4ef1 | // { dg-do assemble }
template <class T>
struct S1 {};
struct S2
{
template <class T>
operator S1<T>*();
};
struct D: public S1<int> {
};
void f()
{
S2 s;
(D*) s; // { dg-error "" } cannot convert
}
|
google | android | static2 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/static2.C | 233 | utf_8 | b0ee25173b0e8adc17515578b0821f22 | // { dg-do assemble }
template <class A>
class TEST
{
public:
TEST (A) {}
};
template <class A>
class TEST2
{
static A i;
};
template <class A>
A TEST2 <A>::i (0);
TEST2 <TEST <int> > a;
template class TEST2 <TEST <int> >;
|
google | android | ttp14 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/ttp14.C | 350 | utf_8 | 08d5bfba5e313c4c6c25e1dd45f5cba0 | // { dg-do run }
template<class T> class D
{
T a;
public:
int f();
};
template<class T> int D<T>::f()
{
return sizeof(T);
}
template<class E,template<class> class DD = D> class C
{
DD<E> d;
public:
int f();
};
template<class E,template<class> class DD> int C<E,DD>::f()
{
DD<E> d2;
return d2.f();
}
int ... |
google | android | typename4 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/typename4.C | 381 | utf_8 | 3574d1c65a0d021c048c1f5c31b9dd35 | // { dg-do assemble }
// { dg-options "-Wno-deprecated" }
template <class T>
struct A
{
typedef T A_Type;
};
template <class U>
struct B : public A<U>
{
};
template <class U>
struct C : public B<U>
{
A_Type Func(); // { dg-error "does not name a type" } implicit typename
};
template <class U>
C<U>::A_Type C... |
google | android | crash29 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/crash29.C | 1,337 | utf_8 | 0511f114a053d6ee5a46245be973b120 | // { dg-do assemble }
typedef __SIZE_TYPE__ size_t;
class UUId {};
template <class T> class MetaClass;
class TypeInfo;
struct MetaClassGeneric
{
MetaClassGeneric( TypeInfo& );
};
struct TypeInfo
{
void (*constructor)( void* );
void ... |
google | android | ttp43 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/ttp43.C | 609 | utf_8 | b3090cd8d030914161af21a2959c2815 | // { dg-do assemble }
template < class T, template <class> class E1, template <class> class E2 >
struct Add {
Add(const E1<T>& e1, const E2<T>& e2) {}
};
template < class T, template <class> class E1, template <class> class E2 >
struct Mul {
Mul(const E1<T>& e1, const E2<T>& e2) {}
};
template < class T >
str... |
google | android | memtemp90 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/memtemp90.C | 477 | utf_8 | 1b5dea7a688d8cd29ce6daa44e226a12 | // { dg-do assemble }
// regression test -
struct A {
template<class T>
struct B {
};
template<class T>
struct C {
B<T> b; // { dg-bogus "" } B is not a template
// but removing wrapper A gets rid of complaint
// also, replacing B<T> with A::B<T> also gets rid of complaint
};
}; |
google | android | static5 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/static5.C | 157 | utf_8 | d3753adb4f484f4fb4b4e2fc61de3464 | // { dg-do assemble }
template <class T>
struct S
{
static const T t = 3; // { dg-error "" } initializing non-integral type
};
double d = S<double>::t;
|
google | android | lookup10 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/lookup10.C | 504 | utf_8 | 1cfd70d8f9071e06a3860770bf0b6165 | // { dg-do assemble }
// We'd get confused entering a namespace via an alias
namespace Outer {
namespace Render_Real {
typedef void Type;
}
namespace Core_Real {}
namespace Core = Core_Real;
namespace Core_Real {
template<class T> void Foo (T *) {} // { dg-error "definition" }
}
template<> void... |
google | android | sizeof3 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/sizeof3.C | 360 | utf_8 | 18de3cbc7fa3cd181a28e0a6fbd17b53 | // { dg-do run }
extern "C" void abort();
template<class T0>
class A {
public:
typedef T0 T;
};
template<int K>
class B {
typedef A<char[K]> BC;
};
template<int N, int M>
class C {
public:
typedef A<char[M]> AC;
};
int main() {
if (sizeof(C<3,7>::AC::T) != 7)
abort();
} |
google | android | vaarg3 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/vaarg3.C | 581 | utf_8 | 16ab4caec40da1144ac9769da903b12a | // { dg-do assemble }
#include <stdarg.h>
struct A {
virtual ~A () {}
};
template <class Type>
void PrintArgs (Type somearg, ...)
{
va_list argp;
va_start (argp, somearg);
Type value;
value = va_arg (argp, Type); // { dg-error "cannot receive" } cannot pass non-POD
va_end (argp);
}
int main (void)
{
A dummy;
PrintA... |
google | android | m8 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/m8.C | 219 | utf_8 | 67f1cce046b4cd8420a0daf2792e2e4f | // { dg-do assemble }
class A {
int a;
public:
A (int aa = 3);
};
class B {
class A {
public:
A (int, int);
};
A aa;
public:
B (int);
};
extern void foo();
B::B (int z) : aa (1, z) {
foo ();
}
|
google | android | explicit72 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/explicit72.C | 835 | utf_8 | 255520dfcb827d85c254e37d553e38e1 | // { dg-do assemble }
// plain char, signed char and unsigned char are distinct types
template <class X, class Y> struct bug {};
template <class X> struct bug<X,char> { typedef char t; };
template <class X> struct bug<X,unsigned char> { typedef unsigned char t; };
template <class X> struct bug<X,signed char> { typedef... |
google | android | memtemp96 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/memtemp96.C | 557 | utf_8 | 8241764ee81eb4d8d3a3be6f72a7a782 | // { dg-do run }
// Test for partial specialization of a member function template.
template <class T> struct A {
template <class U> int f(U) { return 42; }
};
template <>
template <class U>
int A<char>::f(U);
template <>
template <class U>
int A<double>::f(U) { return 24; }
int main ()
{
A<int> ai;
if (ai.f(0) !... |
google | android | ref1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/ref1.C | 164 | utf_8 | d2ba4d7263802ba42326b543f3865c8e | // { dg-do assemble }
// { dg-prune-output "mangled name" }
int i;
template <void (&FN)()>
void g ()
{
FN ();
}
void h ()
{
i = 7;
}
template void g<h>();
|
google | android | memclass2 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/memclass2.C | 300 | utf_8 | fc1c8a869d5ec7559efe90b9c6f9c78b | // { dg-do run }
template <class T> struct A {
template <class U> struct B {
template <class V> void f (V) { }
void g () { }
};
template <class W> struct B<W*> {
void h () { }
};
};
int main ()
{
A<int>::B<char> b;
b.f (42);
b.g ();
A<double>::B<void*> b2;
b2.h ();
}
|
google | android | call2 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/call2.C | 282 | utf_8 | 9c3bb0bec6650550ae0bcd2455ff2f6e | // { dg-do assemble }
struct IsCompressed { };
struct Field {
};
template<class C>
inline bool
for_each(const Field& p, IsCompressed, C)
{
return p.IsCompressed(); // { dg-error "" } calling type like a method
}
template bool for_each<int>(const Field& p, IsCompressed, int);
|
google | android | explicit28 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/explicit28.C | 193 | utf_8 | 8acde1e24b8e67354446cdc4fc287ffe | // { dg-do link }
// GROUPS passed templates
template <class T>
int foo(T t) { return 1; }
template <>
int foo(int i) { return 0; }
int main()
{
return (*((int (*)(int)) &foo<int>))(3);
}
|
google | android | explicit82 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/explicit82.C | 425 | utf_8 | 4be526353ade77179b9091ca5fdb9cf1 | // { dg-do assemble }
// Bug 508. We failed to set/clear lastiddecl appropriately for
// operator names.
struct A {};
template <typename N> void foo (A, int);
template <typename N> void operator<< (A, int);
int main()
{
A a;
operator<< <bool>(a, 0);
foo <bool>(a, 0);
} |
google | android | deduct3 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/deduct3.C | 581 | utf_8 | 2fe1eb3ce0fbd8d466eba9a09bb4eda0 | // { dg-do assemble }
// Bug 1694. We complained during deduction, rather than reject the deduction.
template <class T, T d> class X {};
template <class T> X<T,0> Foo (T *);
template <class T> int Foo (T const *);
void Baz (int *p1, int const *p2)
{
int i = Foo (p1); // { dg-error "" } cannot convert
int j = Foo (... |
google | android | const1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/const1.C | 167 | utf_8 | 62fec5a71882a865b9fc5990e0a91f49 | // { dg-do assemble }
template <class T> struct B { static const int i = 3; };
template <class T> struct A { static const int i = B<T>::i; };
enum { i = A<int>::i };
|
google | android | friend33 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/friend33.C | 304 | utf_8 | ad0e4e76bf18c847685fe381b2db7801 | // { dg-do link }
// { dg-options "-g" }
template <class P1>
struct S1
{
struct SS1
{
};
friend void Foo (const SS1& ss1)
{
}
};
template <class P1>
void Foo(const S1<P1>& s1)
{
typedef typename S1<P1>::SS1 TYPE;
TYPE t;
Foo(t);
}
int main ()
{
S1<double> obj;
Foo(obj);
}
|
google | android | nontype2 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/nontype2.C | 157 | utf_8 | 0859fb1604dffcb7150609995f0c7167 | // { dg-do assemble }
enum E { };
template <const E* ep>
struct S1
{
};
struct S2
{
static E es[1];
};
struct S3
{
typedef S1<S2::es> S3_Type;
};
|
google | android | static10 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/static10.C | 357 | utf_8 | 6e1f9dfcbea7082174a6264d33e93969 | // { dg-do assemble }
// regression test -
template<class A>
struct X {
X(A) {
}
};
template<class A>
struct Y {
static X<A> x(A(1)); // { dg-error "" } ANSI C++ forbids in-class initialization of non-const static member `x'
};
Y<int> y; |
google | android | ttp12 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/ttp12.C | 326 | utf_8 | 565c0feee97fb10e6c6160cf197d28b3 | // { dg-do run }
template<class T> class D
{
public:
int f();
};
template<class T> int D<T>::f()
{
return sizeof(T);
}
template<template<class> class E,class D> class C
{
E<D> d;
public:
int f();
};
template<template<class> class E,class D> int C<E,D>::f()
{
return d.f();
}
int main()
{
C<D,int> c;
c.f... |
google | android | typename17 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/typename17.C | 218 | utf_8 | 536ba4b55b2ed2977446152d5277860c | // { dg-do assemble }
template <class T>
struct A
{
typedef T A_Type;
};
template <class U>
struct B : public A<U>
{
typename B<U>::A_Type Func();
};
template <class U>
typename B<U>::A_Type B<U>::Func()
{
}
|
google | android | m5 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/m5.C | 170 | utf_8 | 0529737246a919aac9b8b2d78f4e5aab | // { dg-do assemble }
struct B { struct A { A(); int a; } aa; };
struct A { A(); int a; };
B::A::A () { a = 37; }
char xx[]="../tests/m5.cc:3: Segmentation violation";
|
google | android | friend49 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/friend49.C | 606 | utf_8 | 3fa14c24a814fa00f1e6d0e86d69bf36 | // { dg-do assemble }
// Bug 2929. We were forgetting about template parm scope when
// injecting a friend decl into a class template specialization's
// containing scope.
template <class Type> class Vec;
template <> class Vec<double>
{
public:
Vec ();
Vec<double> & Fn (double);
friend Vec<double> Fn (const Vec<... |
google | android | crash19 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/crash19.C | 190 | utf_8 | 77a6447cd59f76d2af86fbf4cc3b75a6 | // { dg-do assemble }
template <int I>
void f()
{
class C { public: int c; };
struct S {
void g() {
C e;
e.c = 3;
}
};
S s;
s.g();
}
template void f<7>();
|
google | android | crash44 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/crash44.C | 218 | utf_8 | a69d4126135230851c76a71f97b39819 | // { dg-do assemble }
template <class T>
struct S
{
template <class U>
friend S<U>; // { dg-error "" } friend must use tag
};
template struct S<int>; |
google | android | spec27 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/spec27.C | 222 | utf_8 | e83375c299749ce5b856d368f92db935 | // { dg-do assemble }
template <class T, class U>
struct Y {};
template <class T>
struct X {};
template <class T, class U>
void f()
{
typename X<Y<T, U> >::A a;
}
template <class T, class U>
struct X<Y<T, U> >
{
};
|
google | android | friend30 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/friend30.C | 382 | utf_8 | 72083e7908b694935f8899884c04f89e | // { dg-do assemble }
template <class T, class U>
struct S {
template <class X, class Y, class Z>
friend X f(X, Y, Z);
};
template <class X, class Y, class Z>
X f(X x, Y, Z) {
return x;
}
template char f(char, long, short);
template char* f(char*, long*, short*);
template class S<int, double>;
template class ... |
google | android | crash51 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/crash51.C | 243 | utf_8 | be55e2194ca68fe3f42466daee65f998 | // { dg-do assemble }
// { dg-options "-fpermissive -w" }
char foo[26];
template <class T>
void f ()
{
foo = "0123456789012345678901234"; // { dg-error "array" }
}
template void f<int>(); |
google | android | explicit14 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/explicit14.C | 160 | utf_8 | aa158d2b9769ca6340ade8386dbdd727 | // { dg-do assemble }
// GROUPS passed templates
template <class T>
struct S
{
template <class U>
typename U::R foo(U u);
};
void bar()
{
S<int> si;
}
|
google | android | crash23 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/crash23.C | 340 | utf_8 | 89a6498e8df15b2c24b475472fe46ff0 | // { dg-do assemble }
template <class A, class B> void foo();
template <class C> class bar {
public:
int i;
template <class B> friend void foo<C,B>(); // { dg-error "" } template-id
};
template <class A, class B> void foo() {
bar<A> baz; baz.i = 1;
bar<int> buz; buz.i = 1;
}
int main() {
foo<void,void>();
... |
google | android | crash61 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/crash61.C | 406 | utf_8 | be61b4f9c204928b91f812a20e086e44 | // { dg-do assemble }
// Source: Neil Booth, from PR # 106. 4 Dec 2000.
template <bool b> class bar
{
};
class A_a
{
public:
static const bool b = true;
};
class B_b
{
public:
static const bool b = false;
};
template <class A, class B> class foo
{
};
template <class A, class B>
bar<(A::b || B::b)> do_fu... |
google | android | defarg | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/defarg.C | 128 | utf_8 | 9b2b436f0cd34620fbb48b6126c2dea0 | // { dg-do run }
template <class T>
void f(T t, int i = 10);
template <class T>
void f(T t, int i) {}
int main()
{
f(3);
}
|
google | android | explicit60 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/explicit60.C | 607 | utf_8 | 21da1e285f5d89893db8550f68f1d500 | // { dg-do run }
extern "C" void abort ();
template <class T> void f ();
template <class T> void g ()
{
abort ();
}
template <> void g<char> ()
{
abort ();
}
template <class T> class C
{
public:
void ff () { f<T> (); }
void gg () { g<T> (); }
template <class U> void f () {}
template <class U> ... |
google | android | spec12 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/spec12.C | 243 | utf_8 | 629a9c9d3e53fc2a9cb8b0f4f7590172 | // { dg-do run }
extern "C" void abort();
template <class T>
struct S
{
template <class U>
int f(U u);
};
template <>
template <>
int S<char>::f<int>(int i) { return 1; }
int main()
{
S<char> sc;
if (sc.f(3) != 1)
abort();
}
|
google | android | crash8 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/crash8.C | 529 | utf_8 | 57c5d3a84b07c37790b3197eb54fd5f4 | // { dg-do assemble }
template<class T>
class TestClass1 {
public:
TestClass1() { }
};
template<class T>
class TestClass2 {
public:
TestClass2() { }
T operator()(int) { }
};
template<class T>
void doit(T x) {
TestClass1<T> q1;
q1 = TestClass1<T>();
TestClass2<T> q2;
q2 = TestClass2<T>();
TestClas... |
google | android | memtemp12 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/memtemp12.C | 161 | utf_8 | c49d75255634dd1d38c00b4ccd12186f | // { dg-do assemble }
// GROUPS passed templates membertemplates
template <class T>
struct S
{
template <class U>
void foo(U);
};
void f()
{
S<int> s;
}
|
google | android | ttp28 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/ttp28.C | 446 | utf_8 | 93e2d26dad1778805146f119b74b1529 | // { dg-do run }
template<class T> class D
{
public:
int f();
};
template<class T> int D<T>::f()
{
return sizeof(T);
}
template<template<class> class D,class E> class C
{
D<E> d;
public:
int f() { return d.f(); }
};
template<template<class> class D,class E> int f(D<E> &d1)
{
d1.f();
C<D,E> d2;
d2.f();
... |
google | android | mangle1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/mangle1.C | 194 | utf_8 | 4b4deb18267e40c2d03a3c5410899e63 | // { dg-do assemble }
// { dg-options "" }
typedef enum {} i;
template <int II>
class Bar {};
void f (Bar<21>, int) {}
void f (Bar<2>, i) {} |
google | android | friend13 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/friend13.C | 340 | utf_8 | d2904d6cecac015c1c6e65c460648114 | // { dg-do run }
template <class T>
class C;
template <class U>
struct S
{
template <class V>
void f(V v)
{
C<V> cv;
cv.i = 3;
}
};
template <class T>
class C
{
template <class U>
template <class V>
friend void S<U>::f(V);
int i;
};
int main()
{
S<int> si;
si.f(3.0);
S<long>... |
google | android | explicit57 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/explicit57.C | 456 | utf_8 | 06a024f507d21d212ce0a725d449585d | // { dg-do run }
extern "C" void abort ();
int a = 0;
template <class T> void f ();
template <class T> void g ()
{
if (a)
abort ();
}
template <> void g<char> ()
{
}
template <class T> class C
{
public:
void ff () { f<T> (); }
void gg () { g<T> (); }
};
template <class T> void f ()
{
if (a)
... |
google | android | memtemp31 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/memtemp31.C | 198 | utf_8 | ff2e1e306c99266ec1c5e0c8fd28f834 | // { dg-do link }
// GROUPS passed templates membertemplates
extern "C" int printf(const char*, ...);
struct S
{
template <class U>
void g(U u)
{ this; }
};
int main()
{
S s;
s.g(3);
}
|
google | android | crash18 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/crash18.C | 354 | utf_8 | 1e0208226d67f07bbcf7d617588c459f | // { dg-do link }
template<class T>
class foo {
T deft;
template<class U> int priv (U u, T t) { return u - t; }
public:
foo (T t) : deft (t) {}
template<class U> int pub (U u) {
int (foo::*fn) (U, T);
fn = &foo<T>::template priv<U>;
return (this->*fn) (u, deft);
}
};
int
main ()
{
foo<long>... |
google | android | ttp27 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/ttp27.C | 450 | utf_8 | 6462de0c02cc9496d53c0308c67a54d6 | // { dg-do run }
template<class T> class D
{
public:
int f() const;
};
template<class T> int D<T>::f() const
{
return sizeof(T);
}
template<template<class> class D,class E> class C
{
D<E> d;
public:
int f() const { return d.f(); }
};
template<template<class> class D,class E> int f(const D<E> &d1)
{
d1.f()... |
google | android | ttp22 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/ttp22.C | 403 | utf_8 | a971ec24d9b74fde008269cd83634e77 | // { dg-do run }
template<class T> class D
{
public:
int f();
};
template<class T> int D<T>::f()
{
return sizeof(T);
}
template<template<class> class DD,class EE> class C : DD<EE>
{
public:
int f();
};
template<template<class> class DD,class EE> int C<DD,EE>::f()
{
return DD<EE>::f();
}
class E : C<D,int>
... |
google | android | nontype4 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/nontype4.C | 347 | utf_8 | b8f73a75eea223306130ca7acbb0d8c0 | // { dg-do assemble }
template <class R, void (R::* A) (void)>
class s
{
public:
s (R &r) : _r (r) {}
void e (void) { (_r.*A) (); }
private:
R &_r;
};
class x
{
public:
void test1 (void) { int j = 0; }
void test2 (void) { int j = 1; }
};
int
main (void)
{
x r;
s<x, &x::test1> c4 (r);
s<x, &x::tes... |
google | android | memtemp88 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/memtemp88.C | 380 | utf_8 | 74da4a1f0bfefc0429afd33a40acfb2b | // { dg-do assemble }
struct Q {
template<class>
class X {
};
template<template<class> class XX = X> // { dg-bogus "" } (original definition appeared here)
class Y {
}; // { dg-bogus "" } redefinition of default argument for `template <class> XX'
Y<> y;
}; |
google | android | overload2 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/overload2.C | 174 | utf_8 | 9d9938bf727f56481aae89ded9100089 | // { dg-do assemble }
template<class T>
class C
{
public:
C<T*> O();
C<T*> O() const;
};
int
main()
{
C<char*> c;
char* p = Z(c.O); //{ dg-error "" } ambiguous c.O
}
|
google | android | explicit77 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/explicit77.C | 474 | utf_8 | 576a1f7c9e495255a7332aff96920a5e | // { dg-do assemble }
template <int I, int J, int K>
struct S {};
template <int I, int J>
struct S<I, J, 2> : public S<I, I, I>, S<J, J, J> {};
template <int I, int J, int K>
void f(S<I, J, K>, S<I, I, I>); // { dg-message "note" }
void g() {
S<0, 0, 0> s0;
S<0, 1, 2> s2;
f<0>(s0, s2);
f(s0, s2); // { d... |
google | android | friend12 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/friend12.C | 338 | utf_8 | 072237e6617b11b1f8f54a1cc401ab6f | // { dg-do run }
template <class T>
class C;
template <class T>
struct S
{
template <class U>
void f(U u1, U u2) {}
template <class U>
void f(U u)
{
C<T> ct;
ct.i = 3;
}
};
template <class T>
class C
{
template <class U>
friend void S<T>::f(U);
int i;
};
int main()
{
S<int> s... |
google | android | explicit32 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/explicit32.C | 197 | utf_8 | a8aa5392322852bedda84a7e946a8c38 | // { dg-do assemble }
// GROUPS passed templates
template <class T>
struct S
{
};
template <>
struct S<int>
{
void foo();
};
void S<int>::foo()
{
}
void bar()
{
S<int> si;
si.foo();
}
|
google | android | explicit40 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/explicit40.C | 245 | utf_8 | 72cb6b9b3a57f4fb25f75ad34000165f | // { dg-do run }
extern "C" void abort();
template <void* P>
void f(int j);
template <unsigned int I>
void f(int j);
template <void* P>
void f(int j)
{
abort();
}
template <unsigned int I>
void f(int j)
{
}
int main()
{
f<3>(7);
}
|
google | android | crash22 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/crash22.C | 175 | utf_8 | 575a37429617a03cc1f558ee82dd58ea | // { dg-do assemble }
template <class T>
struct S1 {};
template <class T, class U = S1<T> >
struct S2 {};
template struct S2<100>; // { dg-error "" } type/value mismatch
|
google | android | friend6 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/friend6.C | 237 | utf_8 | f37440b612cf6d74499b8cf3c614fdb2 | // { dg-do run }
template <class T>
void f(T);
class C
{
template <class T>
friend void f(T)
{
C c;
c.i = 3;
}
public:
void g()
{
f(3.0);
}
int i;
};
int main()
{
f(7);
C c;
c.g();
}
|
google | android | export1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/export1.C | 454 | utf_8 | 3487b9fe1bb9aa4e0f54026d6d5d5a26 | // { dg-do assemble }
// bug 721, we died horribly when export was used wrongly
struct test {
int export(void); // { dg-error "" } parse error
};
int test::export(void) // { dg-error "" } parse error
{
return 0;
}
template <class T> class Y;
export template <class T> class X; // { dg-warning "" } export not impleme... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.