This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
GCC suggestions needed
- From: Niklaus <niklaus at gmail dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Mon, 17 Nov 2008 18:54:40 +0530
- Subject: GCC suggestions needed
Hi,
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
Compile error.
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
unrecognized option.
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
most time.