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++.dg/] [rtti/] [typeid8.C] - Rev 315
Go to most recent revision | Compare with Previous | Blame | View Log
// PR c++/36405
// { dg-do compile }
#include <typeinfo>
struct A
{
void foo ()
{
typeid (foo).name (); // { dg-error "invalid use of member" }
typeid (A::foo).name (); // { dg-error "invalid use of member" }
}
void bar ()
{
typeid (foo).name (); // { dg-error "invalid use of member" }
typeid (A::foo).name (); // { dg-error "invalid use of member" }
}
static void baz ()
{
typeid (baz).name ();
typeid (A::baz).name ();
}
};
const char *p1 = typeid (A::foo).name (); // { dg-error "invalid use of non-static member" }
const char *p2 = typeid (A::baz).name ();
Go to most recent revision | Compare with Previous | Blame | View Log