[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bug in $if version parsing
From: |
Chet Ramey |
Subject: |
Re: Bug in $if version parsing |
Date: |
Mon, 18 Jan 2021 15:44:22 -0500 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.6.1 |
On 1/18/21 3:09 PM, Tom Tromey wrote:
I change the GDB test suite to use this inputrc:
$if version >= 8.0
set enable-bracketed-paste off
$endif
However, to my surprise, this did not work. I believe this is a bug in
bind.c:parser_if.
This function computes 'op' as 'OP_GE' (ok so far), but then does:
case OP_GE:
_rl_parsing_conditionalized_out = rlversion >= versionarg;
break;
This sets _rl_parsing_conditionalized_out to 1, but it should be 0.
I think all of these results should be inverted. See the appended patch
for what I mean.
Thanks for the report, you're right about the intent of the tests. I must
have dropped a line when I added this back in readline-8.0.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU chet@case.edu http://tiswww.cwru.edu/~chet/