GCC suggestions needed
Mon Nov 17 13:31:00 GMT 2008
I've an online judge system where i take the source code submitted
by an user and compile it to an executable and then run it against a
predetermined input to produce an output which is checked against a
predetermined output. This determines the results as Correct, Wrong or
The languages are C,C++,java.
Please suggest solutions for the below problems
1) How to tell gcc to stop after the first error. I use both gcc
4.2 and gcc 3.4. I tried -Wfatal-error and -Wfatal-error it says
2) There are many people who submit code without compiling. If they
submit C++ (STL or templates ) code which fails to compile due to some
problem, it produces lots of output and it is slow, some take 3 - 5
secs. So that is for each submission. In this way if you make 100
submissions the whole system is slow. How to over come this problem? I
tried -fsyntax-only but the difference is not that noticable because
after that -fsynax-only i have to recompile.
3) Can this submissions be collected for every 5 secs and then
compiled in parallel to produce parallel output. Invoking gcc for each
submission is going to be slow ?
4) Can we do anything about gcj ? Java compilation errors take the
More information about the Gcc-help