quakeforge/tools/qfcc/test/ptrderef.r
Bill Currie 6ff2644ab5 Fix simple pointer dereferences.
It turns out no code was being generated for x = *y. Ouch. I suspect I need
to take a better look at expr_deref at some time in the not too distant
future.

Conflicts:
	tools/qfcc/source/statements.c
2012-11-09 12:32:35 +09:00

14 lines
193 B
R

void
ptrderef (int *to, int *from)
{
int x;
x = *from;
x = *from++;
x = *++from;
//x = ++*from; FIXME syntax error (valid C)
to = from++;
to = ++from;
*to = *from++;
*to = *++from;
}