Genode and sign-conversion warnings.
Norman Feske
norman.feske at genode-labs.com
Tue Dec 21 12:03:30 CET 2021
Hi Piotr,
On 18.12.21 22:32, Piotr Tworek wrote:
> Since Wconversion got enabled on Genode master branch I'm wondering if
> there are any plans WRT Wsign-conversion warnings? I presonally find it
> a bit strange GCC Wconversion does not also enable Wsign-conversion.
this surprises me as well. I have silently assumed that the latter is
implied. Thank you for pointing that out.
> IMO implicit conversions between signed and unsigned types are as often
> as bad as implicit conversion between types of different size.
I wholeheartedly agree.
I'm all for enabling -Wsign-conversion in addition. However, I'm afraid
that I personally need a little break from the topic. I have seen your
latest pull request [1]. Such improvements - especially with the
rationale so well described as in your commits - are always very much
appreciated.
[1] https://github.com/genodelabs/genode/pull/4354
While working on the -Wconversion topic, I actually wondered about the
use cases of signed integers throughout Genode's base framework and
grep'ed for them out of curiosity. A few niche uses (like the balancing
of AVL trees) notwithstanding, I found that signed integers are almost
never deliberately used. It is tempting to relieve us from the
uncertainties related to signed integers by removing the remaining
instances from the base framework.
Cheers
Norman
--
Dr.-Ing. Norman Feske
Genode Labs
https://www.genode-labs.com · https://genode.org
Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden
Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth
More information about the users
mailing list