From 7ee3d124070db157181bc1b24f2b84913957c388 Mon Sep 17 00:00:00 2001 From: Andy Schwerin Date: Thu, 12 Mar 2015 13:26:30 -0400 Subject: SERVER-17568 Report most-vexing-parse warning as error in MSVC. --- SConstruct | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'SConstruct') diff --git a/SConstruct b/SConstruct index 6efb01156d0..1deefc6b399 100644 --- a/SConstruct +++ b/SConstruct @@ -901,7 +901,13 @@ elif windows: # identifier' : type name first seen using 'objecttype1' now seen using 'objecttype2' # This warning occurs when classes and structs are declared with a mix of struct and class # which can cause linker failures - env.Append( CCFLAGS=["/we4099"] ) + # c4930 + # 'identifier': prototyped function not called (was a variable definition intended?) + # This warning indicates a most-vexing parse error, where a user declared a function that + # was probably intended as a variable definition. A common example is accidentally + # declaring a function called lock that takes a mutex when one meant to create a guard + # object called lock on the stack. + env.Append( CCFLAGS=["/we4099", "/we4930"] ) env.Append( CPPDEFINES=["_CONSOLE","_CRT_SECURE_NO_WARNINGS"] ) -- cgit v1.2.1