On 2019-06-22 01:07:17 +0200, Michael Matz wrote: > On Fri, 21 Jun 2019, Pascal Cuoq wrote: > > If no-one objects, I will push in a few days the following patch, > > I don't object, but have a request: can you explore if changing the type of > the respective variable, instead of adding casts, is equivalent? Especially > the changes in parse_escape_string look as if that's possible. > (I consider such type change only better than casts, if the former doesn't > cause further casts elsewhere, of course).
Changing signed integers to unsigned just to avoid casts for printf-like functions is a bad idea. The reason is that in some expressions, using unsigned types can silently modify the value of a signed type when implicitly converted to unsigned. This is very ugly. FYI, we had bugs like that in GNU MPFR, and that's why we changed the precision type to a signed integer type, even though its value is always positive. -- Vincent Lefèvre <vinc...@vinc17.net> - Web: <https://www.vinc17.net/> 100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/> Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon) _______________________________________________ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel