|
2023-02-24
| ||
| 03:37 | • Closed ticket [40c61a5d10]: Compiler warning/inconsistant error-message in TIP #... artifact: 532f030975 user: apnadkarni | |
| 03:36 | • Ticket [40c61a5d10]: 3 changes artifact: 4d6d17af3b user: apnadkarni | |
| 03:35 | Bug [40c61a5d10]. Fix syntax error message. check-in: ebf20c29bd user: apnadkarni tags: tip-656 | |
| 03:00 | • Ticket [40c61a5d10] Compiler warning/inconsistant error-message in TIP #656 impl... artifact: fb21d8fda5 user: apnadkarni | |
|
2023-02-23
| ||
| 11:47 | • Ticket [40c61a5d10]: 3 changes artifact: f21a7b1c19 user: jan.nijtmans | |
| 10:24 | • Ticket [40c61a5d10]: 3 changes artifact: a344c8328c user: apnadkarni | |
| 10:22 | Fix gcc warnings and encoding error message (bug [40c61a5d10]) check-in: 00b03d47c5 user: apnadkarni tags: tip-656 | |
| 09:54 | • Ticket [40c61a5d10] Compiler warning/inconsistant error-message in TIP #656 impl... artifact: 562e36a99b user: apnadkarni | |
| 07:37 | • Ticket [40c61a5d10]: 3 changes artifact: fcadd953d7 user: jan.nijtmans | |
| 07:36 | • New ticket [40c61a5d10]. artifact: 9620fbda37 user: jan.nijtmans | |
Compiler warning/inconsistant error-message in TIP #656 implementation
tclCmdAH.c: In function ‘EncodingConvertParseOptions’: tclCmdAH.c:592:14: warning: trigraph ??- ignored, use -trigraphs to enable [-Wtrigraphs] 592 | "??-profile profile? ?-failindex var? ?encoding?? data");
Also, when running this:
% encoding convertfrom -profile tcl ascii wrong # args: should be "::tcl::encoding::convertfrom ??-profile profile? ?-failindex var? ?encoding?? data"
This doesn't correspond with the TIP text, making 'encoding' mandatory when any other option is used.
Suggested solution, see here
ebf20c29bdBug [40c61a5d10]. Fix syntax error message. check-in2023-02-24 03:35:3100b03d47c5Fix gcc warnings and encoding error message (bug [40c61a5d10]) check-in2023-02-23 10:22:58
Ah, trigraphs, first time I'm encountering them (inadvertently). I'll fix that.
With respect to your second point, I think the ? around encoding needs to be removed but outermost ? preserved. (Your edit removes the outermost ? which is not the same thing because it makes encoding always mandatory and disallows the 8.6 syntax encoding convertfrom abc.
Thanks for pointing this out.
By the way, TIP and implementation are still WIP. I hope to be done before the weekend.
/Ashok
Fixed in [00b03d47c5]
> Your edit removes the outermost ? which is not the same thing ...
Did you notice the usage of "INTERP_ALTERNATE_WRONG_ARGS"? Most likely you are not aware of this feature. It's what other commands (like "socket") use when the syntax has multiple alternatives.
% encoding convertfrom -profile tcl ascii wrong # args: should be "::tcl::encoding::convertfrom ?-profile profile? ?-failindex var? encoding data" or "::tcl::encoding::convertfrom data"
This way, we put the prefered syntax (making 'encoding' mandatory) first, and the alternative (for 8.6 compatibility) second ☺
Sorry, you're right on all counts. I didn't know about the INTERP_ALTERNATE_WRONG_ARGS feature, didn't notice it in your patch and message. Should have looked more closely.
It is indeed better. Will make that fix. Thanks.
/Ashok