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: Vadim Zeitlin
Subject: Re: [lmi] [lmi-commits] master 371ae7b 2/2: Suppress a gcc-10.0.0 warning for wx
Date: Sun, 7 Jun 2020 13:31:32 +0200

On Sat, 6 Jun 2020 15:39:56 +0000 Greg Chicares <gchicares@sbcglobal.net> wrote:

GC> Sure. This is a newly-created debian-bullseye chroot:
GC> 
GC> $cat /etc/debian_version
GC> bullseye/sid
GC> 
GC> You're using g++ 10.1, whereas I'm using version 10.0.0:

 Sorry, I should have mentioned that I was using the native compiler and
not the cross-compiler. But, finally, this doesn't make any difference.

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

 Thanks! I do see it now (I did something stupid before, which explains why
I couldn't reproduce it previously), but I'm still not quite sure why is
this warning given. It seems to me that the compiler must be doing some
optimization here, which convinces it that typeid(*dlg) is exactly the same
as typeid(wxDialog), because generally speaking this is not the case, of
course, for a "dlg" of type "wxDialog*". Even more confusingly, this seems
to happen only when dlg == NULL in wx code, yet I can't trigger the warning
in a simple example doing the same thing...

 Finally, I've changed the code to avoid the warning in f9780847b8
(Refactor dialog testing code to avoid gcc 10 -Wduplicated-branches,
2020-06-07) in wxWidgets because it has other benefits than suppressing the
warning, and I had already spent more time on this than I planned or
wanted, but I'm still not sure what the exact problem was with the original
code.

 I also still can't reproduce -Wdouble-promotion warning in strvararg.h,
which is also mentioned in 371ae7b17 (Suppress a gcc-10.0.0 warning for wx,
2020-06-05). This is probably even less important, but if you'd be
interested in removing the line disabling it from pchfile_wx.hpp, could you
please show the compiler command line which gives this one to you too?

 Thanks in advance!
VZ

Attachment: pgp1J7tYSjhE9.pgp
Description: PGP signature


reply via email to

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