lmi
[Top][All Lists]
Advanced

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

[lmi] Enabling '-Wconversion'...and std::filesystem? [Was: PATCH: simpli


From: Greg Chicares
Subject: [lmi] Enabling '-Wconversion'...and std::filesystem? [Was: PATCH: simplify attachment page handling]
Date: Wed, 30 May 2018 18:35:11 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0

On 2018-05-27 18:37, Vadim Zeitlin wrote:
> On Sat, 26 May 2018 23:54:00 +0000 Greg Chicares <address@hidden> wrote:
[...]
> GC> (2) to enable '-Wconversion', which we last discussed here:
> GC>   https://lists.nongnu.org/archive/html/lmi/2018-03/msg00023.html
[...]
>  I'm not that worried about these changes conflicting with the changes in
> {ledger_pdf_generator,pdf_writer}_wx.cpp, where there are few such warnings
> (just a single one in the former),

Okay, I can commit those small changes soon.

> but this will almost certainly result in
> some conflicts in my use-std-fs branch, as you will have to deal with
> -Wconversion warnings in Boost.Filesystem headers, probably by wrapping
> them inside the GCC diagnostic push/pop pragmas, while I have changed the
> same lines in that branch. But these conflicts should be relatively simple
> to resolve...

Is your 'std-filesystem' branch just a work in progress, or is it ready to
apply? I don't see it mentioned here:
  https://github.com/vadz/lmi/pulls
or in the archives of this mailing list, but I do see it in my git remote
that corresponds to your github repository. And I find headers like this:
  /usr/include/c++/7/experimental/bits/fs_path.h
so maybe the compiler supports it now.

If it's ready to apply, maybe I should do that first.

I don't think there will be a lot of conflicts anyway. I'm trying to enable
'-Wconversion' with the least possible use of '#pragma GCC', by fixing the
root cause of each warning.

>  BTW, I'll also need to correct the (tons of) remaining -Wconversion
> warnings in wxWidgets headers if you want to do this for all lmi files as
> there are still plenty of them left, I don't know why did the message
> linked to above only mentions the couple of warnings about double-to-int
> casts when g++ 7 gives a couple of dozens more of them for casts from long
> to int in the same header.

I haven't thought about building wx itself with '-Wconversion'. AFAICT,
enabling that warning for building lmi doesn't identify any problem with
included wx headers. But we don't have to think about that now: let me
commit my changes, and if I've overlooked something, we'll see it then.



reply via email to

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