Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: fa07896ff8486dc94b7950f704c55bac88677bcf
Ticket: 509340ffffffffffffffffffffffffffffffffff
ClientData set to int* not void*
User & Date: davygrvy on 2002-01-27 23:45:10
Changes

  1. assignee changed to: "hobbs"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    With the MS compiler, the following is allowed without 
    casting even with langauge extensions turned off (-Za).
    
    /*#include "tcl.h"*/
    #ifdef __STDC__
    #   if defined(__STDC_VERSION__) && __STDC_VERSION__ 
    == 199409L
    #pragma message ("*** ISO C and AM1 complient")
    #   else
    #pragma message ("*** ISO C, but not AM1 
    complient")
    #   endif
    #else
    #   pragma message ("*** Not ISO C complient")
    #endif
    
    void main (void)
    {
        /*ClientData someTypeLessPointer;*/
        void *someTypeLessPointer;
        struct {
    __int64 a;
    char b;
        } someStruct;
    
        someTypeLessPointer = &someStruct;
    }
    
    Placing a typed pointer into a typeless pointer is 
    allowed.  The typedef for ClientData should be void*, 
    not int* under this compiler, IMO.
    
    Notice the test for __STDC__ is a failure under this 
    compiler, too.  __STDC__ is only defined when the -Za 
    switch is used.  I'm at a loss to understand what the 
    complience of the compiler really is, but getting back 
    to the patch, a void* is legal, so let's use it.
    
  4. foundin changed to: "None"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "davygrvy"
  9. subsystem changed to: "55. Other Tools"
  10. title changed to: "ClientData set to int* not void* "
  11. type changed to: "Patch"