Overview
| Artifact ID: | 894fd5ecb2e55550c42d91d70e8a18232a6ecce429e154ac409ba67e458577e7 |
|---|---|
| Ticket: | ae62bacc43e4c89cc8602faee8a664e14dacd8fd
-Wformat warnings with MSYS2 UCRT64: TCL_LL_MODIFIER "I64" is checked as gnu_printf |
| User & Date: | jan.nijtmans on 2026-10-29 10:54:07 |
Changes
- assignee changed to: "jan.nijtmans"
- closedate changed to: "2461342.9542495371"
- closer changed to: "jan.nijtmans"
- comment changed to:
Building with MSYS2 UCRT64 (gcc 16.2.0) gives many <tt>-Wformat</tt> warnings, all on format strings using <tt>TCL_LL_MODIFIER</tt>, <tt>TCL_Z_MODIFIER</tt> or <tt>TCL_T_MODIFIER</tt>: <verbatim> generic/tkBind.c:2985:50: warning: format '%u' expects argument of type 'unsigned int', but argument 4 has type 'long long unsigned int' [-Wformat=] generic/tclStrToD.c:5315:44: warning: 'I' flag used with '%x' gnu_printf format [-Wformat=] </verbatim> With <tt>-D__USE_MINGW_ANSI_STDIO=0</tt>, which configure sets, <tt>tcl.h</tt> defines <tt>TCL_LL_MODIFIER</tt> as <tt>"I64"</tt>, but the UCRT64 headers check the formats as <tt>gnu_printf</tt>, which does not know <tt>I64</tt>. The counts: Tcl 11 (8.6), 31 (9.0), 29 (9.1); Tk 52 (8.6), 57 (9.0), 67 (9.1). This was reported in [c975939973], closed as Remind because 8.6 has to support the Windows XP runtime. A UCRT build uses the UCRT <tt>printf</tt>, which accepts <tt>ll</tt>, so perhaps <tt>"ll"</tt> could be used when <tt>_UCRT</tt> is defined.
- icomment:
Good idea! Thanks! Merged to [14e76b55b7c270a6]. Will also be merged to core-9-0-branch and core-8-6-branch
- login: "jan.nijtmans"
- mimetype: "text/x-fossil-wiki"
- resolution changed to: "Fixed"
- status changed to: "Closed"