Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 77cb48425fb1f63629c44d641b9fab255982588c87d646d6e2594bef3da6b8a8
Ticket: 1ae976e237cf0a4d040de9435ce0554a8c8c7606
Compiled [clock clicks -mi] returns microseconds instead of an ambiguous option error
User & Date: serhiy.storchaka on 2026-10-12 20:32:40
Changes

  1. cmimetype changed to: "text/x-fossil-wiki"
  2. comment changed to:
    <code>clock clicks -mi</code> is an error ("ambiguous option "-mi": must be
    -milliseconds or -microseconds"), but in compiled code 9.1 accepts it and
    returns microseconds:
    
    <verbatim>
    proc p {} {clock clicks -mi}
    p
    </verbatim>
    
    9.0 compiles the option only if it is at least 4 characters long, so it gives
    the error in both cases. [507b920e63] (TIP 720) replaced that check with
    <code>IS_TOKEN_PREFIX(tokenPtr, 3, ...)</code>.
    
    Proposed fix in branch [/timeline?r=compile-clock-clicks-ambiguous|compile-clock-clicks-ambiguous]:
    require 4 characters again. Tests clock-33.7.1 and clock-33.7.2.
    
  3. foundin changed to: "9.1.0"
  4. login: "serhiy.storchaka"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. severity changed to: "Minor"
  8. status changed to: "Open"
  9. submitter changed to: "serhiy.storchaka"
  10. subsystem changed to: "47. Bytecode Compiler"
  11. title changed to:
    Compiled [clock clicks -mi] returns microseconds instead of an ambiguous option error
    
  12. type changed to: "Bug"