Very nice finding, ollydbg.  

Instead of "-", I would use 
/dev/null or 
nul depending on operating system, since otherwise gcc will hang (at least does here). Also, if you already call 
g++, the 
-x c++ is not needed.
Now, the question is whether to call 
gcc or 
g++, actually it would be nice to always call the "correct" compiler depending on whether you compile C or C++ so include paths would be different for C (which they are in real, too) ... but projects may be mixed, and you don't want to call an external program for every single source file parsed...