[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lmi] PATCH: tests build fixes for clang
From: |
Vadim Zeitlin |
Subject: |
Re: [lmi] PATCH: tests build fixes for clang |
Date: |
Mon, 8 Mar 2021 19:39:15 +0100 |
On Sun, 7 Mar 2021 23:13:01 +0000 Greg Chicares <gchicares@sbcglobal.net> wrote:
GC> It looks like we once suppressed many warnings in 'pchfile_wx.hpp',
GC> and have progressively suppressed the suppression of most. I'll take
GC> it on faith that the last remaining one is a gcc-8 defect; in that
GC> case, conditionalizing it on the gcc version sounds ideal to me.
We can see that gcc-9 doesn't give these warnings in the CI build at
https://github.com/let-me-illustrate/lmi/pull/173/checks?check_run_id=2051098965
and I also don't see these particular warnings locally with gcc-10.
However, I do see the same warnings in include/xmlwrapp/node.h when
building using configure, but they're actually justified there and the
error message correctly points to several places where pointers are
initialized using literal "0". I've corrected this in xmlwrapp itself, but
I haven't updated the lmi version because somehow they're not given when
using lmi makefiles.
The trouble is that I really don't understand why aren't they. We clearly
include xmlwrapp/node.h containing offending code from xml_lmi.hpp which is
itself included from skeleton.cpp and I've confirmed[*] that it is compiled
with -Wzero-as-null-pointer-constant, and yet no warning is produced. I
must be missing something very obvious here, but I just don't see what, do
you by chance?
Anyhow, to return to the original plan of modifying pchfile_wx.hpp to
still disable this warning for gcc-8, but not for the later versions, I
think I have a better proposal: why not add -Wzero-as-null-pointer-constant
option for gcc > 8 only? We already check gcc version in workhorse.make
anyhow, so it would be simple to do and I think it would be both better
(because this flag is clearly broken with gcc 8) and simpler (because we
wouldn't need to do anything at all to disable it at the code level).
What do you think? I.e. would you accept a PR doing it like this?
VZ
[*] I wonder if there is some way to avoid lmi makefiles overriding my make
options by explicitly setting MAKEFLAGS. I have to remember to do
things like "make local_options==--what-if=/full/path/skeleton.cpp" to
force recompiling the file instead of just using --what-if normally
because of it and this is just annoying.
pgpPBZ5OnTq6a.pgp
Description: PGP signature
- [lmi] PATCH: tests build fixes for clang, Vadim Zeitlin, 2021/03/07
- Re: [lmi] PATCH: tests build fixes for clang, Greg Chicares, 2021/03/07
- Re: [lmi] PATCH: tests build fixes for clang, Vadim Zeitlin, 2021/03/07
- Re: [lmi] PATCH: tests build fixes for clang, Greg Chicares, 2021/03/07
- Re: [lmi] PATCH: tests build fixes for clang, Vadim Zeitlin, 2021/03/07
- Re: [lmi] PATCH: tests build fixes for clang, Greg Chicares, 2021/03/07
- Re: [lmi] PATCH: tests build fixes for clang,
Vadim Zeitlin <=
- Re: [lmi] PATCH: tests build fixes for clang, Greg Chicares, 2021/03/08
- Re: [lmi] PATCH: tests build fixes for clang, Vadim Zeitlin, 2021/03/08
- [lmi] MAKEFLAGS [Was: PATCH: tests build fixes for clang], Greg Chicares, 2021/03/08
- Re: [lmi] MAKEFLAGS, Vadim Zeitlin, 2021/03/09
- Re: [lmi] MAKEFLAGS, Greg Chicares, 2021/03/09
- Re: [lmi] MAKEFLAGS, Vadim Zeitlin, 2021/03/09
- Re: [lmi] MAKEFLAGS, Greg Chicares, 2021/03/09
Re: [lmi] PATCH: tests build fixes for clang, Greg Chicares, 2021/03/08
Re: [lmi] PATCH: tests build fixes for clang, Greg Chicares, 2021/03/08