Artifacts Associated With Ticket 2124814
Ticket change [5ca5745fb4] (rid 115344) by flatworm on 2008-09-23 16:00:45:
- assignee initialized to: "dkf"
- cmimetype initialized to: "text/plain"
- 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)); - foundin initialized to: "obsolete: 8.6a3"
- is_private initialized to: "0"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "flatworm"
- subsystem initialized to: "35. TclOO Package"
- title initialized to:
Compilation of tclOOMethod.c fails for MSVC 6.0 compiler
- type initialized to: "Bug"
Ticket change [de669ed143] (rid 114841) by dkf on 2008-09-24 16:53:32:
- closedate changed to: "2008-09-24T09:53:32"
- closer changed to: "dkf"
- icomment:
Bother. I'd removed the use of that macro from the code, but forgot the declaration...
- login: "dkf"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- username: "dkf"