| Ticket UUID: | 1855644 | ||
| Title: | TclCompile uses C++ reserved keyword "operator" | ||
| Type: | Bug | Created on: | 2007-12-21 10:33:41 |
| Submitter: | fanfdesalpes | Assigned to: | msofer |
| Subsystem: | 47. Bytecode Compiler | Severity: | |
| Priority: | 8 | Last modified: | 2008-01-17 23:13:53 |
| Status: | Closed | Closed by: | msofer |
| Resolution: | Fixed | Closed on: | 2008-01-17 16:13:53 |
| Version: | obsolete: 8.5.0 | ||
| Description: | ||||
TclCompile uses C++ reserved keyword "operator" in the "TclOpCmdClientData" structure. When compiling with C++, one has to #define operator _operator before #include "tclCompile.h" which is ugly. I know I shouldn't include private headers such as this one, but using C++ reserved keywords should be avoided anyway, I think. | ||||
| User Comments: | ||||
dkf added on 2007-12-22 04:22:53:
Logged In: YES
user_id=79902
Originator: NO
We use other C++ reserved words all over too ("new" is a favourite). If it's not in a header file, I'm not going to get in the slightest bit excited. (The header files should be loadable even when compiling C++, of course.)
msofer added on 2007-12-22 04:56:46:
Logged In: YES user_id=148712 Originator: NO It *is* in a header file: tclCompile.h, line 820 msofer added on 2008-01-11 20:46:21:
File Added - 261795: operator.diff Logged In: YES user_id=148712 Originator: NO Attached patch that replaxes 'operator' with 'op'. OK? File Added: operator.diff dgp added on 2008-01-15 13:13:08:
Logged In: YES user_id=80530 Originator: NO The tclUnixThrd.c change is in the patch by mistake? Other than that, this seems fine, though catering to C++ needs is mildly distasteful; especially in a header file that no other code is supposed to #include. | ||||
Attachments:
- operator.diff [download] added by msofer on 2008-01-11 20:46:18. [details]
