8sa1-gcc/gcc/testsuite/g++.old-deja/g++.jason/lvalue2.C
Jeff Law 921e5a0eb4 Initial revision
From-SVN: r14840
1997-08-19 01:34:40 -06:00

21 lines
362 B
C

// PRMS Id: 4892
// Bug: COND_EXPRs, MODIFY_EXPRs and COMPOUND_EXPRs aren't properly recognized
// as lvalues.
// Build don't link:
extern int foo;
int& f (int& a, int& b)
{
return (foo ? a : b); // gets bogus error -
}
int& g (int& a)
{
return (a = 0); // gets bogus error -
}
int& h (int& a, int& b)
{
return (a = 1, b); // gets bogus error -
}