Skip to content

Commit

Permalink
增加编译器错误显示限制,防止产生大量错误信息
Browse files Browse the repository at this point in the history
  • Loading branch information
virusdefender committed Feb 19, 2016
1 parent 4f41de1 commit 397f79a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions judge/language.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
"name": "c",
"src_name": "main.c",
"code": 1,
"compile_command": "/usr/bin/gcc -DONLINE_JUDGE -O2 -w -std=c99 {src_path} -lm -o {exe_path}/main",
"compile_command": "/usr/bin/gcc -DONLINE_JUDGE -O2 -w -fmax-errors=3 -std=c99 {src_path} -lm -o {exe_path}/main",
"execute_command": "{exe_path}/main",
"use_sandbox": True
},
2: {
"name": "cpp",
"src_name": "main.cpp",
"code": 2,
"compile_command": "/usr/bin/g++ -DONLINE_JUDGE -O2 -w -std=c++11 {src_path} -lm -o {exe_path}/main",
"compile_command": "/usr/bin/g++ -DONLINE_JUDGE -O2 -w -fmax-errors=3 -std=c++11 {src_path} -lm -o {exe_path}/main",
"execute_command": "{exe_path}/main",
"use_sandbox": True
},
Expand Down

3 comments on commit 397f79a

@virusdefender
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

部分特殊的代码可以让编译器产生大量的错误提示,可能导致卡死,这里限制一下,出现3个错误之后就停止编译。

@Ir1d
Copy link

@Ir1d Ir1d commented on 397f79a Feb 19, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 最近花式卡OJ太可啪了

@virusdefender
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@imcaffrey 是的,就是听说了一种新的方法。。

Please sign in to comment.