Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: e4f3196d4a632b0f6c2fabd7246a6789e2427ef1
Ticket: 1592791fffffffffffffffffffffffffffffffff
Fix 64bit pointer cast warnings
User & Date: das on 2006-11-08 17:25:27
Changes

  1. assignee changed to: "das"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    Building 64bit tcl on LP64 platforms with gcc4 (and probably earlier) gives 
    many 'cast to/from pointer from/to integer of different size' warnings 
    about (safe) casts to/from ClientData and other void* types
    
    The recommended way to avoid these warnings is to add casts to the 
    intermediate types intptr_t/uintptr_t.
    
    The recently released autoconf 2.60 has AC_TYPE_INTPTR_T resp 
    AC_TYPE_UINTPTR_T macros  to check if these C99 types are available (if 
    an upgrade to autoconf 2.60 is not possible, it should be possible to write 
    equivalent macros for tcl.m4).
    
    The attached patch adds casts to (INTPTR_T) resp (UINTPTR_T) where 
    needed, those are macros in tclInt.h that fall back to void* if the intptr_t /
    uintptr_t types are not available.
    
    I have not touched the windows configure.in, 64bit win will thus fallback 
    as above and may still have those warnings, if so it is probably sufficient 
    to make the same changes as in unix/configure.in but I cannot test this.
    
  4. foundin changed to: "None"
  5. is_private changed to: "0"
  6. priority changed to: "6"
  7. resolution changed to: "None"
  8. status changed to: "Open"
  9. submitter changed to: "das"
  10. subsystem changed to: "53. Configure and Build Tools"
  11. title changed to: "Fix 64bit pointer cast warnings"
  12. type changed to: "Patch"