URL
https://opencores.org/ocsvn/scarts/scarts/trunk
Subversion Repositories scarts
[/] [scarts/] [trunk/] [toolchain/] [scarts-gcc/] [gcc-4.1.1/] [gcc/] [testsuite/] [g++.old-deja/] [g++.mike/] [p701.C] - Rev 12
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();
}