Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 026d1d7f660dcccf59c438e266a5ce5638980e041f05dea9297e3bdd0fc51767
Ticket: ae62bacc43e4c89cc8602faee8a664e14dacd8fd
-Wformat warnings with MSYS2 UCRT64: TCL_LL_MODIFIER "I64" is checked as gnu_printf
User & Date: serhiy.storchaka on 2026-10-29 10:07:11
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/x-fossil-wiki"
  4. 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.
    
  5. foundin changed to: "8.6.18, 9.0.5, 9.1.1"
  6. login: "serhiy.storchaka"
  7. priority changed to: "5 Medium"
  8. resolution changed to: "None"
  9. severity changed to: "Minor"
  10. status changed to: "Open"
  11. submitter changed to: "serhiy.storchaka"
  12. subsystem changed to: "53. Configuration and Build Tools"
  13. title changed to:
    -Wformat warnings with MSYS2 UCRT64: TCL_LL_MODIFIER "I64" is checked as gnu_printf
    
  14. type changed to: "Bug"