lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lmi] [lmi-commits] master 371ae7b 2/2: Suppress a gcc-10.0.0 warnin


From: Greg Chicares
Subject: Re: [lmi] [lmi-commits] master 371ae7b 2/2: Suppress a gcc-10.0.0 warning for wx
Date: Sat, 6 Jun 2020 15:39:56 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0

On 2020-06-06 14:24, Vadim Zeitlin wrote:
> On Fri,  5 Jun 2020 16:14:48 -0400 (EDT) Greg Chicares 
> <gchicares@sbcglobal.net> wrote:
> 
> GC> branch: master
> GC> commit 371ae7b17bd0d03b76f9ecb03bae077126fd563b
[...]
> GC>     Suppress a gcc-10.0.0 warning for wx
> GC>     
> GC>     The only line affected is 'testing.h:55':
> GC>       (dlg ? typeid(*dlg) : typeid(T)).name());
[...]
>  I wanted to fix these warnings in wxWidgets itself, but before fixing them
> I wanted to reproduce them -- and totally failed to do it. I've tried
> building the files including the specified headers using the same warning
> options lmi uses, with both -O0 and, when this didn't work, -O2, with g++
> 10.1 from Debian Sid, but I just don't see any warnings at all.
> 
>  Could you please let me know which compiler command lines result in these
> warnings appearing?

Sure. This is a newly-created debian-bullseye chroot:

$cat /etc/debian_version
bullseye/sid

You're using g++ 10.1, whereas I'm using version 10.0.0:

$i686-w64-mingw32-g++ --version
i686-w64-mingw32-g++ (GCC) 10-win32 20200525
Copyright (C) 2020 Free Software Foundation, Inc. [...]

$i686-w64-mingw32-g++ -dM -E -x c++ - < /dev/null 2>&1 |grep "GNUC\|VER"
#define __GNUC_PATCHLEVEL__ 0
#define __GNUC__ 10
#define __GXX_ABI_VERSION 1014
#define __VERSION__ "10-win32 20200525"
#define __GNUC_STDC_INLINE__ 1
#define __GNUC_MINOR__ 0

...although the package version seems to be 10.1.0-3+23:

$dpkg -l g++-mingw-w64
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version      Architecture Description
+++-==============-============-============-=================================
ii  g++-mingw-w64  10.1.0-3+23  all          GNU C++ compiler for MinGW-w64

Here's a command that reproduces the duplicated-branches warning:

$i686-w64-mingw32-g++ -MMD -MP -MT main_wx_test.o -MF main_wx_test.d  -c -I 
/opt/lmi/src/lmi -I /opt/lmi/src/lmi/tools/pete-2.1.1 -I 
/opt/lmi/local/gcc_i686-w64-mingw32/lib/wx/include/i686-w64-mingw32-msw-unicode-3.1
 -I /opt/lmi/local/include/wx-3.1 -I /opt/lmi/third_party/include -I 
/opt/lmi/third_party/src -I /opt/lmi/local/include -I 
/opt/lmi/local/include/libxml2 -DLMI_WX_NEW_USE_SO  -DLIBXML_USE_DLL -DSTRICT   
 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXMSW__ -D_FILE_OFFSET_BITS=64 
-DBOOST_NO_AUTO_PTR -DBOOST_NO_STD_ALLOCATOR -DBOOST_STRICT_CONFIG 
-DBOOST_STATIC_ASSERT_HPP   -fno-ms-extensions -frounding-math -std=c++17 
-pedantic-errors -Werror -Wall -Walloc-zero -Walloca -Wcast-align -Wconversion 
-Wdangling-else -Wdeprecated-declarations -Wdisabled-optimization 
-Wdouble-promotion -Wduplicated-branches -Wduplicated-cond -Wextra 
-Wformat-nonliteral -Wformat-security -Wformat-signedness -Wformat-y2k -Wimport 
-Winit-self -Winvalid-pch -Wlogical-op -Wmissing-include-dirs -Wmultichar 
-Wnull-dereference -Wpacked -Wpointer-arith -Wredundant-decls -Wrestrict 
-Wshadow -Wsign-compare -Wstack-protector -Wswitch-enum -Wtrampolines -Wundef 
-Wunreachable-code -Wunused-macros -Wvector-operation-performance 
-Wwrite-strings -Wno-parentheses  -Wc++11-compat -Wc++14-compat -Wc++1z-compat 
-Wconditionally-supported -Wctor-dtor-privacy -Wdelete-non-virtual-dtor 
-Wdeprecated -Wnoexcept -Wnoexcept-type -Wnon-template-friend 
-Wnon-virtual-dtor -Woverloaded-virtual -Wpmf-conversions -Wregister -Wreorder 
-Wstrict-null-sentinel -Wsynth -Wuseless-cast  -Wcast-qual    
-D'BOOST_STATIC_ASSERT(A)=static_assert((A))'   -ggdb -O2 
-fno-omit-frame-pointer    /opt/lmi/src/lmi/main_wx_test.cpp -omain_wx_test.o
In file included from /opt/lmi/src/lmi/wx_test_document.hpp:30,
                 from /opt/lmi/src/lmi/wx_test_new.hpp:27,
                 from /opt/lmi/src/lmi/main_wx_test.cpp:35:
/opt/lmi/local/include/wx-3.1/wx/testing.h: In instantiation of ‘wxString 
wxGetDialogClassDescription(const wxClassInfo*, T*) [with T = MvcController]’:
/opt/lmi/local/include/wx-3.1/wx/testing.h:178:46:   required from ‘wxString 
wxExpectModalBase<T, E>::GetDefaultDescription() const [with T = MvcController; 
E = wxExpectDismissableModal<MvcController>]’
/opt/lmi/local/include/wx-3.1/wx/testing.h:176:22:   required from here
/opt/lmi/local/include/wx-3.1/wx/testing.h:55:38: error: this condition has 
identical branches [-Werror=duplicated-branches]
   55 |                                 (dlg ? typeid(*dlg) : 
typeid(T)).name());
      |                                 ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors



reply via email to

[Prev in Thread] Current Thread [Next in Thread]