Overview
| Artifact ID: | 5ca5745fb425e42463bebe70247d000e7b06d7d8 |
|---|---|
| Ticket: | 2124814fffffffffffffffffffffffffffffffff
Compilation of tclOOMethod.c fails for MSVC 6.0 compiler |
| User & Date: | flatworm on 2008-09-23 16:00:45 |
Changes
- assignee changed to: "dkf"
- cmimetype changed to: "text/plain"
- comment changed 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 changed to: "obsolete: 8.6a3"
- is_private changed to: "0"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "flatworm"
- subsystem changed to: "35. TclOO Package"
- title changed to:
Compilation of tclOOMethod.c fails for MSVC 6.0 compiler
- type changed to: "Bug"