Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: a668ba05d1fbab324d86f1d06188102d3e1528a0
Ticket: 633204ffffffffffffffffffffffffffffffffff
catch { return foo } breaks inside proc
User & Date: nobody on 2002-11-04 11:05:42
Changes

  1. assignee changed to: "msofer"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    
    In TCL 8.4.1: 
    
    % info patchlevel
    8.4.1
    % catch { return foo }
    2
    % proc foo {} { catch { return foo } }
    % foo
    0
    %
    
    ???  Putting the code inside a proc changes the return value?
    These should return the same thing.  In Tcl 8.3.3 
    
    % info patchlevel
    8.3.3
    % catch { return foo }
    2
    % proc foo {} { catch { return foo } }
    % foo
    2
    %
    
    Since the behaviour changes when the code is put inside a proc, 
    I *suspect* a bytecode compiler bug.
    
    Details: 
    
    Tcl 8.4.1
    $ uname -a
    SunOS xxxxxxxx 5.7 Generic_106541-10 sun4u sparc 
    SUNW,UltraSPARC-IIi-cEngine
    $ gcc --version
    2.95.2
    
    
  4. foundin changed to: "obsolete: 8.4.1"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "nobody"
  9. subsystem changed to: "47. Bytecode Compiler"
  10. title changed to: "catch { return foo } breaks inside proc "
  11. type changed to: "Bug"