URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Subversion Repositories openrisc_me
[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [g++.old-deja/] [g++.other/] [typename1.C] - Rev 305
Compare with Previous | Blame | View Log
// { dg-do assemble }
// { dg-options "-pedantic -Wno-deprecated" }
// This code snippet should be rejected with -pedantic
// Based on a test case by Louidor Erez <s3824888@techst02.technion.ac.il>
template<class T>
class Vector {
public:
typedef T* iterator;
};
template<class T>
void f()
{
Vector<T>::iterator i = 0; // { dg-error "typename" } missing typename
} // { dg-error "expected" "" { target *-*-* } 16 }