Intel C++ Compiler 关于Warning, error的处理

Intel® C++ Compiler for Windows* - Compiler Diagnostics

                                          (i.e. errors, warnings or remarks)

 

国内使用和关于Intel C++ Compiler的资料并不多,本人在工作中参考了Intel的这些Compile的规则。

希望对大家的工作有所帮助。

                                                                                                                             ----Autodesk, ACRD. Wentao Sun.

List of Diagnostics and Definitions

Although there is not a comprehensive document for all the diagnostic definitions for the Intel® C++ Compilers, you can get a list of all the diagnostics with a brief definition with a new option "-Qdiag-dump" on Windows* or "-diag-dump" on Linux* or Mac OS*. 
Note: this option is new to Intel C++ 10.0 Compilers. 

For more information on a specific diagnostic, submit an issue and ask us.

1. Intel C++ Compiler Diagnoses More Warnings than Visual C++* or gcc*

Typically the Intel C++ Compiler emits more warnings. These warnings alert programmers to potentially non-portable or dangerous situations. If you have any questions about a warning, please contact Intel® Premier Support.

2. Disabling Warnings and Errors

To disable one or multiple warnings or errors, use "-QwdXXX,YYY" on Windows or "-wdXXX,YYY" on Linux or Mac OS 
To disable all warnings, use "-w" on all platforms. (可以用-Qwd123来disable warning, 在VC++的preprocess definitions中加入即可。另外可以用-w来disable所有的错误。)

3. Disabling all auto-parallelizer remarks (自动并行化的标记)

To disable all the auto-paralelizer diagnostic messages, use "-Qdiag-disable:par" for Windows, "-diag-disable par" for Linux or Mac OS. 
Note: this is new to the Intel C++ 10.0 Compilers.

Disabling all vectorization remarks

To disable all the vectorization messages, use "-Qdiag-disable:vec" for Windows, "-diag-disable vec" for Linux or Mac OS. 
Note: this is new to the Intel C++ 10.0 Compilers.

Disabling cpu-dispatch remarks

To disable all the vectorization messages, use "-Qdiag-disable:cpu-dispatch" for Windows, "-diag-disable cpu-dispatch" for Linux or Mac OS. 
Note : this is new to the Intel C++ 10.0 Compilers.

Disabling all remarks

To disable a remark, use "-Qdiag-disable:remark" for Windows, "-diag-disable remark" for Linux and Mac OS. 
This option disables all the remarks including vectorization, auto-parallelization, cpu-dispatch etc. diagnostic messages. 
Note: this is new to the Intel C++ 10.0 Compilers. 

Please see the Compiler Options section in the User's Guide for more information.
原文地址:https://www.cnblogs.com/SunWentao/p/1318026.html