Skip to content
Tcl Source Code History Of Ticket 2124814
Login

History Of Ticket 2124814

Artifacts Associated With Ticket 2124814

  1. Ticket change [5ca5745fb4] (rid 115344) by flatworm on 2008-09-23 16:00:45:

    1. assignee initialized to: "dkf"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      Compilation of tclOOMethod.c fails for MSVC 6.0 compiler with this error:
      
      tclOOMethod.c ..\generic\tclOOMethod.c(24) : error C2010: '.' : unexpected in macro formal parameter list
      ..\generic\tclOOMethod.c(24) : error C2010: '.' : unexpected in macro formal parameter list
      ..\generic\tclOOMethod.c(24) : error C2010: '.' : unexpected in macro formal parameter list
      ..\generic\tclOOMethod.c(24) : error C2010: ')' : unexpected in macro formal parameter list
      
      The culprit is the debugging code:
      
      #if 0
      #define DBPRINT(format, ...) (fprintf(stderr, "DEBUG:" format "\n", __VA_ARGS__))
      #else
      #define DBPRINT(format, ...) ((void) 0)
      #endif
      
      This particular compiler seem to doesn't understand "..." in macro definitions, and I'm sure if it's not gcc'ism, it can be at least C99'ism or so.
      
      Changing 
      #define DBPRINT(format, ...) ((void) 0)
      to
      #define DBPRINT(format, X) ((void) 0)
      solved the problem.
      
      I would propose using the "standard" technique:
      if 0
      #define DBPRINT(X) printf##X
      #else
      #define DBPRINT(X) do {} while(0)
      #endif
      ...
      DBPRINTF(("foo is %d\n", Foo));
      
      
    4. foundin initialized to: "obsolete: 8.6a3"
    5. is_private initialized to: "0"
    6. priority initialized to: "5 Medium"
    7. resolution initialized to: "None"
    8. status initialized to: "Open"
    9. submitter initialized to: "flatworm"
    10. subsystem initialized to: "35. TclOO Package"
    11. title initialized to:
      Compilation of tclOOMethod.c fails for MSVC 6.0 compiler
      
    12. type initialized to: "Bug"
  2. Ticket change [de669ed143] (rid 114841) by dkf on 2008-09-24 16:53:32:

    1. closedate changed to: "2008-09-24T09:53:32"
    2. closer changed to: "dkf"
    3. icomment:
      Bother. I'd removed the use of that macro from the code, but forgot the declaration...
      
      
    4. login: "dkf"
    5. mimetype: "text/plain"
    6. resolution changed to: "Fixed"
    7. status changed to: "Closed"
    8. username: "dkf"