[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: |
Thu, 21 Nov 2024 12:02:59 +0100 |
User-agent: |
Mutt/2.2.13+77 (9dc98409) vl-169878 (2024-06-20) |
On 2024-11-21 10:25:41 +0100, Domingo Alvarez Duarte wrote:
> After Vicent Lefevre message I looked again at it and did the experimental
> change sown bellow, the original code is a bit problematic because it has
> "9" hardcoded in "#define __TINYC__ 9%.2s\n" and was using a substring of
> "0.9.28rc", not the best solution but a bit more clear in my opinion.
>
> ====
>
> #define TCC_VERSION_MAJOR "0.9."
> #define TCC_VERSION_MINOR "28rc"
> #define TCC_VERSION TCC_VERSION_MAJOR TCC_VERSION_MINOR
>
> ====
>
> ====
>
> cstr_printf(cs, "#define __TINYC__ 9%.2s\n", TCC_VERSION_MINOR);
>
> ====
Yes, this is better. In particular, the current "+ 4" may be
incorrect at the next major version if it becomes 10 (thus with
2 digits)! What is the version naming convention?
BTW, if in the next major version, the minor version has a single
digit, this will still be incorrect (the current code is affected
too).
--
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)
- Re: [Tinycc-devel] Warning/bug detected by clang, (continued)
- Re: [Tinycc-devel] Warning/bug detected by clang, avih, 2024/11/21
- Re: [Tinycc-devel] Warning/bug detected by clang, Domingo Alvarez Duarte, 2024/11/21
- Re: [Tinycc-devel] Warning/bug detected by clang, avih, 2024/11/21
- Re: [Tinycc-devel] Warning/bug detected by clang, Steffen Nurpmeso, 2024/11/21
- Re: [Tinycc-devel] Warning/bug detected by clang, grischka, 2024/11/21
- Re: [Tinycc-devel] Warning/bug detected by clang, Vincent Lefevre, 2024/11/22
Re: [Tinycc-devel] Warning/bug detected by clang,
Vincent Lefevre <=