[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Tinycc-devel] match formats and arguments exactly
From: |
Vincent Lefevre |
Subject: |
Re: [Tinycc-devel] match formats and arguments exactly |
Date: |
Sat, 22 Jun 2019 12:40:36 +0200 |
User-agent: |
Mutt/1.12.1+22 (05d31caa) vl-117499 (2019-06-21) |
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 <address@hidden> - 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)
- Re: [Tinycc-devel] match formats and arguments exactly, (continued)
- Re: [Tinycc-devel] match formats and arguments exactly, Christian Jullien, 2019/06/21
- Re: [Tinycc-devel] match formats and arguments exactly, C.J. Wagenius, 2019/06/21
- Re: [Tinycc-devel] match formats and arguments exactly, Ivo van Poorten, 2019/06/21
- Re: [Tinycc-devel] match formats and arguments exactly, Vincent Lefevre, 2019/06/21
- Re: [Tinycc-devel] match formats and arguments exactly, Larry Doolittle, 2019/06/21
- Re: [Tinycc-devel] match formats and arguments exactly, Pascal Cuoq, 2019/06/21
- Re: [Tinycc-devel] match formats and arguments exactly, Vincent Lefevre, 2019/06/21
Re: [Tinycc-devel] match formats and arguments exactly, Michael Matz, 2019/06/21
- Re: [Tinycc-devel] match formats and arguments exactly,
Vincent Lefevre <=