diff -r a6ad49f2b4e8 -r a70f89c46ec5 src/SConscript --- a/src/SConscript Thu Feb 14 10:00:56 2013 +0000 +++ b/src/SConscript Thu Feb 14 10:01:21 2013 +0000 @@ -903,12 +903,15 @@ # Add additional warnings here that should not be applied to # the SWIG generated code new_env.Append(CXXFLAGS='-Wmissing-declarations') + if compareVersions(env['GCC_VERSION'], '4.7') >= 0: + new_env.Append(CXXFLAGS='-Wdelete-non-virtual-dtor') if env['CLANG']: swig_env.Append(CCFLAGS=['-Wno-unused-label', '-Wno-unused-value']) # Add additional warnings here that should not be applied to # the SWIG generated code - new_env.Append(CXXFLAGS='-Wmissing-declarations') + new_env.Append(CXXFLAGS=['-Wmissing-declarations', + '-Wdelete-non-virtual-dtor']) werror_env = new_env.Clone() werror_env.Append(CCFLAGS='-Werror')