lmi
[Top][All Lists]
Advanced

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

Re: [lmi] Warnings with gcc-8.2


From: Vadim Zeitlin
Subject: Re: [lmi] Warnings with gcc-8.2
Date: Wed, 20 Mar 2019 15:08:43 +0100

On Wed, 20 Mar 2019 11:28:20 +0000 Greg Chicares <address@hidden> wrote:

[...]
GC> No, the 'gcc -v' output is exactly the same
[...]
GC> However, your source file may very well differ from mine, because I'm
GC> using a version of wx that's almost a year old:
GC> 
GC> /cache_for_lmi/vcs/wxWidgets[0]$git log -1
GC> commit e38866d3a603f600f87016458260f73593627348 (HEAD)
GC> Merge: 457ba4ace52 deee5c19eb7
GC> Author: Vadim Zeitlin <address@hidden>
GC> Date:   2018-04-06T13:40:20+00:00

 Oops, you're absolutely correct, of course, sorry for not having thought
about this on my own. I can reproduce the warnings perfectly well with
tif_predict.c version from the src/tiff submodule commit corresponding to
this wxWidgets commit. And I see that the warning has indeed been fixed in
the upstream libtiff sources more than a year ago (but it was merged into
wx only later) in

https://gitlab.com/libtiff/libtiff/commit/25840917ad378bc7accad791de981e052a8481f2

So this issue is fully explained now, thanks.

GC> Yes, I'll look into that, now that I know MinGW-w64 gcc-8.2 doesn't have
GC> std::filesystem yet and we'll therefore have to keep boost for a while
GC> longer.

 From what I understand, the native builds of the compiler do have it, but
the Debian build of the cross-compiler somehow doesn't. I am really not
sure why, but perhaps we could just use the library from the native
compiler distribution? This looks dirty and I haven't tried it, but if it
could allow us to finally switch to std::filesystem and drop Boost stuff,
it might be worth trying, what do you think?


GC> Here's the entire command for compiling 'previewframe_ex.o', with all
GC> of its output:
GC> 
GC> i686-w64-mingw32-g++ -MMD -MP -MT previewframe_ex.o -MF previewframe_ex.d  
-c -I /opt/lmi/src/lmi -I /opt/lmi/src/lmi/tools/pete-2.1.1 -I 
/opt/lmi/local/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__ -DBOOST_NO_AUTO_PTR 
-DBOOST_STRICT_CONFIG -DBOOST_STATIC_ASSERT_HPP   -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 
-Wpacked -Wpointer-arith -Wredundant-decls -Wrestrict -Wshadow -Wsign-compare 
-Wstack-protector -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 -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/previewframe_ex.cpp 
-opreviewframe_ex.o
GC> In file included from /opt/lmi/local/include/wx-3.1/wx/clntdata.h:16,
GC>                  from /opt/lmi/local/include/wx-3.1/wx/event.h:17,
GC>                  from /opt/lmi/src/lmi/wx_utility.hpp:29,
GC>                  from /opt/lmi/src/lmi/previewframe_ex.hpp:38,
GC>                  from /opt/lmi/src/lmi/previewframe_ex.cpp:32:
GC> /usr/lib/gcc/i686-w64-mingw32/8.2-win32/include/c++/type_traits: In 
instantiation of 'constexpr bool std::__call_is_nt(std::__invoke_other) [with 
_Fn = const wxIntegerHash&; _Args = {const long unsigned int&}]':
GC> /usr/lib/gcc/i686-w64-mingw32/8.2-win32/include/c++/type_traits:2663:34:   
required by substitution of 'template<bool __v> using __bool_constant = 
std::integral_constant<bool, __v> [with bool __v = std::__call_is_nt<const 
wxIntegerHash&, const long unsigned int&>((std::__result_of_success<unsigned 
int, std::__invoke_other>::__invoke_type{}, std::__result_of_success<unsigned 
int, std::__invoke_other>::__invoke_type()))]'
GC> /usr/lib/gcc/i686-w64-mingw32/8.2-win32/include/c++/type_traits:2661:12:   
required from 'struct std::__call_is_nothrow<std::__invoke_result<const 
wxIntegerHash&, const long unsigned int&>, const wxIntegerHash&, const long 
unsigned int&>'
GC> /usr/lib/gcc/i686-w64-mingw32/8.2-win32/include/c++/type_traits:131:12:   
required from 'struct std::__and_<std::__is_invocable<const wxIntegerHash&, 
const long unsigned int&>, std::__call_is_nothrow<std::__invoke_result<const 
wxIntegerHash&, const long unsigned int&>, const wxIntegerHash&, const long 
unsigned int&> >'
GC> /usr/lib/gcc/i686-w64-mingw32/8.2-win32/include/c++/type_traits:2673:12:   
required from 'struct std::__is_nothrow_invocable<const wxIntegerHash&, const 
long unsigned int&>'
GC> /usr/lib/gcc/i686-w64-mingw32/8.2-win32/include/c++/type_traits:131:12:   
required from 'struct std::__and_<std::__is_fast_hash<wxIntegerHash>, 
std::__is_nothrow_invocable<const wxIntegerHash&, const long unsigned int&> >'
GC> /usr/lib/gcc/i686-w64-mingw32/8.2-win32/include/c++/type_traits:142:31:   
required from 'struct 
std::__not_<std::__and_<std::__is_fast_hash<wxIntegerHash>, 
std::__is_nothrow_invocable<const wxIntegerHash&, const long unsigned int&> > >'
GC> 
/usr/lib/gcc/i686-w64-mingw32/8.2-win32/include/c++/bits/unordered_map.h:104:66:
   required from 'class std::unordered_map<long unsigned int, 
wxImageHistogramEntry, wxIntegerHash, wxIntegerEqual>'
GC> /opt/lmi/local/include/wx-3.1/wx/image.h:193:50:   required from here
GC> /opt/lmi/local/include/wx-3.1/wx/hashmap.h:510:12: error: but 'size_t 
wxIntegerHash::operator()(long unsigned int) const' does not throw; perhaps it 
should be declared 'noexcept' [-Werror=noexcept]
GC>      size_t operator()( unsigned long x ) const { return ulongHash( x ); }
GC>             ^~~~~~~~
GC> cc1plus: all warnings being treated as errors
GC> make[1]: *** [/opt/lmi/src/lmi/workhorse.make:916: previewframe_ex.o] Error 
1
GC> 
GC> As above, I'm using lmi HEAD, with a year-old wx.

 This one still remains unexplained, however. Using wxWidgets commit
e38866d3a603f600f87016458260f73593627348 and the same command line with
just the paths being adjusted, I get many "cast-function-type" warnings and
one "redundant-decls" warning for wxQsort. And if I disable both of these
warnings using the corresponding -Wno-xxx options, I don't get any warnings
any more.

 I'm really not sure what am I doing wrong. The standard library headers do
seem to be the same, i.e. the line numbers above correspond to the files on
my system, and we've already checked that the compiler itself was the same
one and I'm now testing with the same wxWidgets version. What else could be
possibly different?

 For now I'll look into fixing the "redundant-decls" warning for wxQsort,
as this one is still present in wx master, and will try to return to the
"noexcept" one later, in the hope that I have some fresh ideas by then,
because right now I don't have any...

 Regards,
VZ


reply via email to

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