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"

====


_______________________________________________
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel

Reply via email to