tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] Warning/bug detected by clang


From: Vincent Lefevre
Subject: Re: [Tinycc-devel] Warning/bug detected by clang
Date: Wed, 20 Nov 2024 14:07:32 +0100
User-agent: Mutt/2.2.13+77 (9dc98409) vl-169878 (2024-06-20)

On 2024-11-20 13:01:44 +0100, Domingo Alvarez Duarte wrote:
> The fact that tinycc is handling this issue doesn't mean that it's doing it
> properly.

The code is correct. But perhaps adding a cast like

  cstr_printf(cs, "#define __TINYC__ 9%.2s\n", TCC_VERSION + 4);

to

  cstr_printf(cs, "#define __TINYC__ 9%.2s\n", (const char *) TCC_VERSION + 4);

would make the warning disappear and make the code a bit more readable
(the reader might have thought that TCC_VERSION was an integer).

-- 
Vincent Lefèvre <vincent@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)



reply via email to

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