tinycc-devel
[Top][All Lists]
Advanced

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

[Tinycc-devel] Warning/bug detected by clang


From: Domingo Alvarez Duarte
Subject: [Tinycc-devel] Warning/bug detected by clang
Date: Wed, 20 Nov 2024 12:15:34 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0

While testing building tinycc with several compilers I'm getting this warning from "zig cc" (clang 18):

====

tccpp.c:3589:62: warning: adding 'int' to a string does not append to the string [-Wstring-plus-int]
 3589 |     cstr_printf(cs, "#define __TINYC__ 9%.2s\n", TCC_VERSION + 4);
      | ~~~~~~~~~~~~^~~
tccpp.c:3589:62: note: use array indexing to silence this warning
 3589 |     cstr_printf(cs, "#define __TINYC__ 9%.2s\n", TCC_VERSION + 4);
|                                                              ^
      | &           [  ]
1 warning generated.

====

Here is the definition of TCC_VERSION

====

#define TCC_VERSION "0.9.28rc"

====




reply via email to

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