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

15 lines
184 B
C

// prms-id: 3836
void f(int &i) { // ERROR - ref line
i = 10;
}
int main()
{
int i=1, j=2;
f(i);
f((int)j); // ERROR - passing in to non-const
if (j != 2)
return 1;
}