[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lmi] Enabling '-Wconversion'...and std::filesystem? [Was: PATCH: si
From: |
Greg Chicares |
Subject: |
Re: [lmi] Enabling '-Wconversion'...and std::filesystem? [Was: PATCH: simplify attachment page handling] |
Date: |
Wed, 30 May 2018 23:12:06 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 |
On 2018-05-30 20:18, Vadim Zeitlin wrote:
> On Wed, 30 May 2018 18:35:11 +0000 Greg Chicares <address@hidden> wrote:
>
[...your use-std-fs branch is still a work in progress; and MinGW-w64 gcc-7
has experimental/filesystem but not the final C++17 filesystem library...]
>
> FWIW MinGW 8.1 is already available
Okay. It's not on debian yet (where 'sid' has the same version I'm already
using with 'buster'), but presumably they'll release it fairly soon.
> (and I did the work to make wxWidgets
> compilable with it without tons of new warnings, notably in the headers,
> that are now part of either -Wall or -Wextra) and it has std::filesystem
> and not only std::experimental::filesystem. With the way the last couple of
> compile went -- i.e. pretty smoothly -- we might want to upgrade to it
> before switching to std::filesystem.
That sounds like a good plan. The last few compiler upgrades have indeed
gone very smoothly. OTOH, we've seen that falling behind is costly.
> GC> > BTW, I'll also need to correct the (tons of) remaining -Wconversion
> GC> > warnings in wxWidgets headers if you want to do this for all lmi files
> as
> GC> > there are still plenty of them left, I don't know why did the message
> GC> > linked to above only mentions the couple of warnings about double-to-int
> GC> > casts when g++ 7 gives a couple of dozens more of them for casts from
> long
> GC> > to int in the same header.
[...]
> GC> AFAICT, enabling that warning for building lmi doesn't identify any
> GC> problem with included wx headers.
>
> It does. I don't know if this has changed with gcc 7 (this would be simple
> to test but, to be honest, do we really care...),
We needn't care. The changes I'm working on are valid improvements
and well worth applying. Once I've applied them, we can see if any
more changes are necessary.
> but using -Wconversion
> with wx/gdicmn.h (which is included by just about all GUI wxWidgets
> headers) does result in many warnings. Now that I think about it, it might
> only happen in 64 bits, I don't think I tested it in 32 bits. But we'd
> still presumably want to fix this even then, wouldn't we?
I'm not seeing any such problem with 32-bit compiles. But of course
we want to change to 64-bit builds, and we'll want to fix any warnings
that are seen only there.