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++.mike/] [p701.C] - Rev 414
Go to most recent revision | Compare with Previous | Blame | View Log
// { dg-do assemble }
// prms-id: 701
extern "C"
{
int printf(const char *, ...);
}
void Munge(int& x) // { dg-error "passing argument 1" }
{
x = 2;
}
class A
{
public:
int i;
A(int x) : i(x) {}
void Safe() const;
};
void
A::Safe() const
{
Munge(i); // { dg-error "invalid initialization" }
}
int main()
{
const A a(1);
a.Safe();
}
Go to most recent revision | Compare with Previous | Blame | View Log