← Back to team overview

kicad-developers team mailing list archive

Re: -Wsuggest-override with scripting enabled

 

Hey John,

I just tested this on mingw32 using gcc 6.2.0 and I'm still getting the
override warnings when building pcbnew_wrap.cxx on a clean config and
build.  I did a verbose build and here is the compiler command:

[ 72%] Building CXX object
pcbnew/CMakeFiles/pcbnew_kiface.dir/pcbnew_wrap.cxx.obj
cd
/C/msys64/home/wstambaugh/build32/kicad/product-release-stock-boost/pcbnew
&& /C/msys64/mingw32/bin/g++.exe   -DHAVE_STDINT_H -DKICAD_SCRIPTING
-DKICAD_SCRIPTING_MODULES -DKICAD_SCRIPTING_WXPYTHON -DKICAD_SPICE
-DKICAD_USE_OCE -DKICAD_USE_SCH_IO_MANAGER -DPCBNEW -DUSE_OPENMP
-DWXUSINGDLL -DWX_COMPATIBILITY -D_FILE_OFFSET_BITS=64 -D_UNICODE
-D__USE_MINGW_ANSI_STDIO=1 -D__WXMSW__ -Dpcbnew_kiface_EXPORTS
-I/C/msys64/home/wstambaugh/src/kicad-trunk/include
-I/C/msys64/home/wstambaugh/src/kicad-trunk/pcbnew/. -isystem
/C/msys64/mingw32/lib/wx/include/msw-unicode-3.0 -isystem
/C/msys64/mingw32/include/wx-3.0
-I/C/msys64/home/wstambaugh/src/kicad-trunk/pcbnew/./dialogs
-I/C/msys64/home/wstambaugh/src/kicad-trunk/pcbnew/./autorouter
-I/C/msys64/home/wstambaugh/src/kicad-trunk/pcbnew/../3d-viewer
-I/C/msys64/home/wstambaugh/src/kicad-trunk/pcbnew/../common
-I/C/msys64/home/wstambaugh/src/kicad-trunk/pcbnew/../polygon
-I/C/msys64/home/wstambaugh/src/kicad-trunk/pcbnew/../common/dialogs
-I/C/msys64/home/wstambaugh/src/kicad-trunk/pcbnew/./exporters
-I/C/msys64/home/wstambaugh/src/kicad-trunk/pcbnew/../lib_dxf
-I/C/msys64/home/wstambaugh/src/kicad-trunk/pcbnew/./import_dxf
-I/C/msys64/home/wstambaugh/src/kicad-trunk/pcbnew/../utils/idftools
-I/C/msys64/mingw32/include
-I/C/msys64/home/wstambaugh/build32/kicad/product-release-stock-boost
-I/C/msys64/mingw32/include/python2.7
-I/C/msys64/home/wstambaugh/src/kicad-trunk/scripting
-I/C/msys64/home/wstambaugh/src/kicad-trunk/pcbnew/swig
-I/C/msys64/home/wstambaugh/src/kicad-trunk/pcbnew/../common/swig  -Wall
 -Wsuggest-override -Wno-unused-local-typedefs -Wno-strict-aliasing
-fopenmp -mthreads -fpermissive -O3 -DNDEBUG -DNDEBUG
-fvisibility=hidden -fno-keep-inline-dllexport   -fopenmp -std=gnu++11
-Wno-suggest-override -o
CMakeFiles/pcbnew_kiface.dir/pcbnew_wrap.cxx.obj -c
/C/msys64/home/wstambaugh/build32/kicad/product-release-stock-boost/pcbnew/pcbnew_wrap.cxx
S

It does appear that -Wno-suggest-override is after -Wsuggest-override
which should (at least with gcc) take precedence.  I'm not sure what's
going on here but your patch doesn't work with gcc 6.2.0 on mingw.  I'll
test it on linux to see if the behavior is any different but I suspect
it will be the same.  Are you using a different compiler?

Cheers,

Wayne

On 10/5/2016 10:05 AM, John Beard wrote:
> Hi,
> 
> Rather than blanket-disabling -Wsuggest-override when scripting is
> enabled, it's possible to turn the warnings off for just the
> problematic pcbnew_wrap.cxx file using set_source_file_properties().
> 
> This means when building with scripting (which I always do), the
> warnings are still enabled for all other files.
> 
> Second patch is an override opportunity which was previously silenced
> by the blanket disabling of the warning.
> 
> Thanks,
> 
> John
> 
> 
> 
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
> 


Follow ups

References