895a896,904
>
> # Both gcc and clang have issues with unused labels and values in
> # the SWIG generated code
> 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')
>
897,899c906,909
< swig_env.Append(CCFLAGS=['-Wno-uninitialized', '-Wno-sign-compare',
< '-Wno-parentheses', '-Wno-unused-label',
< '-Wno-unused-value'])
---
> # Depending on the SWIG version, we also need to supress
> # warnings about missing field initializers.
> swig_env.Append(CCFLAGS='-Wno-missing-field-initializers')
>
903,905c913,916
< # Add additional warnings here that should not be applied to
< # the SWIG generated code
< new_env.Append(CXXFLAGS='-Wmissing-declarations')
---
> # If gcc supports it, also warn for deletion of derived
> # classes with non-virtual desctructors. For gcc >= 4.7 we
> # also have to disable warnings about the SWIG code having
> # potentially uninitialized variables.
907a919
> swig_env.Append(CCFLAGS='-Wno-maybe-uninitialized')
909c921,923
< swig_env.Append(CCFLAGS=['-Wno-unused-label', '-Wno-unused-value'])
---
> # Always enable the warning for deletion of derived classes
> # with non-virtual destructors
> new_env.Append(CXXFLAGS=['-Wdelete-non-virtual-dtor'])
911,915d924
< # Add additional warnings here that should not be applied to
< # the SWIG generated code
< new_env.Append(CXXFLAGS=['-Wmissing-declarations',
< '-Wdelete-non-virtual-dtor'])
<