URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Subversion Repositories openrisc_me
[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.dg/] [warn/] [return-reference.C] - Rev 149
Go to most recent revision | Compare with Previous | Blame | View Log
// { dg-do compile }
const int* bar();
const int&
foo1()
{
static int empty;
const int* x = bar();
return (x ? *x : empty); // { dg-bogus ".*" "" { xfail *-*-* } }
}
const int&
foo2()
{
static int empty;
const int* x = bar();
const int& r = (x ? *x : empty);
return (r);
}
Go to most recent revision | Compare with Previous | Blame | View Log