Re: [Wormux-dev] Fighting integer overflow/wrap

2010-03-02 Par sujet Matthieu Fertré
Hi, just a few word to say that I have tried to implement such a class, but I have currently failed to have something working. There are lot of implicit cast to int, and that leads to ambiguity between operators acting on int and those actinng on UnsignedInt. I will continue to try but not too

Re: [Wormux-dev] Fighting integer overflow/wrap

2010-02-08 Par sujet Matthieu Fertré
Hi, Le 07.02.2010 19:04, Florian Köberle a écrit : > Hello gentildemon > > I too have thought about doing something against the unsigned integers > in wormux. > Unsigned integers in C++ are a bad thing in my opinion for the following > reasons: > 1. They overflow easily. > 2. Their overflow behavi

Re: [Wormux-dev] Fighting integer overflow/wrap

2010-02-08 Par sujet Matthieu Fertré
Le 07.02.2010 18:45, Julien PUYDT a écrit : > Matthieu Fertré a écrit : > >> I'm quite fed up with integer overflow/wrap. Unsigned integers in >> particular are particularly dangerous [1]. Last week, I have again fixed >> a bug related to unsigned int wrap (uint length = 0 - 4, the result of

Re: [Wormux-dev] Fighting integer overflow/wrap

2010-02-07 Par sujet Florian Köberle
Hello gentildemon I too have thought about doing something against the unsigned integers in wormux. Unsigned integers in C++ are a bad thing in my opinion for the following reasons: 1. They overflow easily. 2. Their overflow behaviour is not defined: Different compilers or different optimization f

Re: [Wormux-dev] Fighting integer overflow/wrap

2010-02-07 Par sujet Julien PUYDT
Matthieu Fertré a écrit : > I'm quite fed up with integer overflow/wrap. Unsigned integers in > particular are particularly dangerous [1]. Last week, I have again fixed > a bug related to unsigned int wrap (uint length = 0 - 4, the result of > this operation gives a very big number, not zero nor