简体   繁体   English

发生某些错误时,如何防止Visual Studio 2008 C编译器停止?

[英]How to prevent Visual Studio 2008 C compiler from stopping when some errors occur?

I want to see how many errors I have in my source code but compiler stops when it encounters some errors (but not all). 我想看看我的源代码中有多少错误,但是编译器在遇到某些错误(但不是全部)时会停止。

Is there a way to make Visual Studio to continue compiling until it finds all errors in code? 有没有办法让Visual Studio继续编译,直到找到代码中的所有错误?

(Visual Studio 2008 is mandatory) (必须使用Visual Studio 2008)

EDIT: I need to do this for the following reason. 编辑:由于以下原因,我需要这样做。 We have a c99 code base but customer demands an older version which Visual Studio 2008 should be able to compile. 我们有一个c99代码库,但客户需要Visual Studio 2008应该能够编译的旧版本。 Thus we want to see how many errors occur because of the difference between c99 and c89 (not c 89 but a version in between for Visual Studio 2008). 因此,我们想看看由于c99和c89(不是c 89,而是Visual Studio 2008的介于两者之间的版本)之间的差异而发生多少错误。

" Thus we want to see how many errors occur because of the difference between c99 and c89 " 因此,我们想看看由于c99和c89之间的差异而发生了多少错误

I don't think you can do that. 我认为您无法做到。 For example: 例如:

int example(void)
{
    getsomething();
    int i;            // <== invalid in C89

The above example is just 1 error but will generate lots of errors because i is not declared in the remainder. 上面的示例只是1个错误,但由于未在其余部分声明i ,因此会产生很多错误。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM