GCC suggestions needed
Tom St Denis
Mon Nov 17 13:38: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
> 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.
I'm going to suggest for the good of all humanity, that the person who
is judging a comp.sci challenge should probably be able to script up an
automated testing harness such that you can do something like
for f in *.zip; do ./run_test.sh $f; done
At the high level (say submissions are zip files or whatever) and then
your shell script unpacks, tries to compile, run, compares, etc.
More information about the Gcc-help