启用下列SDL强制编译器警告视为错误: Warning Command line switch Description
C4146
/we4146
A unary minus operator was applied to an unsigned type, resulting in an unsigned result
C4308
/we4308
A negative integral constant converted to unsigned type, resulting in a possibly meaningless result
C4532
/we4532
Use of “continue”, “break” or “goto” keywords in a __finally/finally block has undefined behavior during abnormal termination
C4533
/we4533
Code initializing a variable will not be executed
C4700
/we4700
Use of an uninitialized local variable
C4789
/we4789
Buffer overrun when specific C run-time (CRT) functions are used
C4995
/we4995
Use of a function marked with pragma deprecated
C4996
/we4996
Use of a function marked as deprecated
一个开发人员如想以选择大部分的/ SDL的功能,但排除一个给定的警告编号(假设为例C4146)然后这可以通过在/ WD开关以禁用彗星/彗星++下,具体警告实现 - >命令行 - >附加选项在Visual Studio的用户界面:
strict_gs_check pragma是适用于所有的C/ C + +代码编译/ SDL。这指示编译器将考虑作为潜在的堆栈缓冲区溢出保护候选人更多的功能。 Visual Studio 2010中引入的GS优化得到了提高strict_gs_check一起更好地工作,特别是使许多额外的安全检查从strict_gs_check被证明是不必要的和删除。