tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] match formats and arguments exactly


From: Michael Matz
Subject: Re: [Tinycc-devel] match formats and arguments exactly
Date: Sat, 22 Jun 2019 20:34:35 +0200 (CEST)
User-agent: Alpine 2.21 (LSU 202 2017-01-01)

Hi,

On Sat, 22 Jun 2019, Vincent Lefevre wrote:


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.

Sure. Which is why I said "if [changing the type] ... is equivalent". If it causes above issues it isn't equivalent.


Ciao,
Michael.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]