[Leaf] Unable to compile with particular flags.
Hi. I have a project ( https://github.com/rokoDev/buffer/tree/develop ) where I want to use Boost.Leaf as an error handling mechanism. And in addition I need to compile it by clang compiler with flags "-Werror -Wshadow-all -Wsign-conversion -Wextra" but it turned out that Boost.Leaf was unable to compile with these flags. So I have created a git fork( https://github.com/rokoDev/leaf/tree/clang_flags ) from official Boost.Leaf ( https://github.com/boostorg/leaf ) and made minimal changes which allowed me to build it with those flags. Also I have run all unit tests for Boost.Leaf on MacOS with success. Is it possible to accept my changes(probably with appropriate corrections if either) in order to allow compilation of any project with the same compiler flags as in my project but using the official version of Boost.Leaf?
On Mon, Sep 5, 2022, at 1:17 PM, Misha Doter via Boost wrote: Is it possible to accept my
changes(probably with appropriate corrections if either) in order to allow compilation of any project with the same compiler flags as in my project but using the official version of Boost.Leaf?
My take on this is that you already can, by marking the boost includes system headers (-isystem or the equivalent of the build system like `SYSTEM` in CMake). You can, of course, also make pull requests with improvements to Boost libraries, but that doesn't need to be framed as an urgent fix in general. Of course, in the case when the warnings would actually indicate a serious defect that is a different story and can be treated with urgency it deserves.
On Mon, 5 Sept 2022 at 15:21, Seth via Boost
My take on this is that you already can, by marking the boost includes system headers (-isystem or the equivalent of the build system like `SYSTEM` in CMake).
You can, of course, also make pull requests with improvements to Boost
need to be framed as an urgent fix in general. Of course, in the case when the warnings would actually indicate a serious defect that is a different story and can be
Thank you for suggesting a SYSTEM option. I didn't know about that. But
unfortunately this doesn't work for Windows as good as for Linux and MacOS:
https://discourse.cmake.org/t/marking-headers-as-system-does-not-suppress-wa...
On Mon, 5 Sept 2022 at 15:21, Seth via Boost
На пн, 5.09.2022 г. в 5:06 ч. Misha Doter via Boost
Hi. I have a project ( https://github.com/rokoDev/buffer/tree/develop ) where I want to use Boost.Leaf as an error handling mechanism. And in addition I need to compile it by clang compiler with flags "-Werror -Wshadow-all -Wsign-conversion -Wextra"
Please confirm that this branch solves the problem: https://github.com/boostorg/leaf/tree/feature/werror.
On Tue, 6 Sept 2022 at 04:57, Emil Dotchevski via Boost < boost@lists.boost.org> wrote:
Please confirm that this branch solves the problem: https://github.com/boostorg/leaf/tree/feature/werror.
Thank you, this branch solves the problem only for Debug build. For Release it fails to compile boost/leaf/detail/optional.hpp with 4 messages "Unused parameter 'key' " for lines 140, 146, 152 and 158. So in order to suppress the warnings I have added 'ignore' template funcion https://github.com/rokoDev/leaf/tree/feature/werror
participants (3)
-
Emil Dotchevski
-
Misha Doter
-
Seth