Just found the IGCC (Interactive GCC) REPL. I like it.
Example:
./igcc
g++> int a = 1, b = 2;
g++> printf("%d\n", a + b);
3
g++>
And it gives you compile errors like this:
g++> c = 3;
[Compile error - type .e to see it.]
g++> .e
<stdin>:14:1: error: use of undeclared identifier 'c'
c = 3;
^
(SF download: http://sourceforge.net/projects/igcc/files/)