PING^1

On 5/5/22 09:55, Martin Liška wrote:
> On 5/4/22 21:38, Iain Sandoe wrote:
>>
>>
>>> On 4 May 2022, at 20:14, Martin Liška <mli...@suse.cz> wrote:
>>>
>>> Right now, when a \$x escape sequence occures, the
>>> next character after $x is skipped, which is bogus.
>>>
>>> The code has very low coverage right now.
>>>
>>> Patch can bootstrap on x86_64-linux-gnu and survives regression tests.
>>>
>>> Ready to be installed?
>>
>> … just curious ...
>>
>> Is there no way to test this?
> 
> There is and as mentioned, I verified the current behavior is wrong for one
> case where '\n' is being handled.
> 
>> or to identify a target where the behaviour would be changed with/without 
>> the patch?
>> (and confirm the expected result).
> 
> I've done that.
> 
> Martin
> 
>>
>> thanks
>> Iain
>>
>>
>>> Thanks,
>>> Martin
>>>
>>> gcc/ChangeLog:
>>>
>>>     * gengtype-state.cc (read_a_state_token): Do not skip extra
>>>     character after escaped sequence.
>>> ---
>>> gcc/gengtype-state.cc | 10 ----------
>>> 1 file changed, 10 deletions(-)
>>>
>>> diff --git a/gcc/gengtype-state.cc b/gcc/gengtype-state.cc
>>> index dfd9ea52785..2dfe8edf1a5 100644
>>> --- a/gcc/gengtype-state.cc
>>> +++ b/gcc/gengtype-state.cc
>>> @@ -473,43 +473,33 @@ read_a_state_token (void)
>>>             {
>>>             case 'a':
>>>               obstack_1grow (&bstring_obstack, '\a');
>>> -             getc (state_file);
>>>               break;
>>>             case 'b':
>>>               obstack_1grow (&bstring_obstack, '\b');
>>> -             getc (state_file);
>>>               break;
>>>             case 't':
>>>               obstack_1grow (&bstring_obstack, '\t');
>>> -             getc (state_file);
>>>               break;
>>>             case 'n':
>>>               obstack_1grow (&bstring_obstack, '\n');
>>> -             getc (state_file);
>>>               break;
>>>             case 'v':
>>>               obstack_1grow (&bstring_obstack, '\v');
>>> -             getc (state_file);
>>>               break;
>>>             case 'f':
>>>               obstack_1grow (&bstring_obstack, '\f');
>>> -             getc (state_file);
>>>               break;
>>>             case 'r':
>>>               obstack_1grow (&bstring_obstack, '\r');
>>> -             getc (state_file);
>>>               break;
>>>             case '"':
>>>               obstack_1grow (&bstring_obstack, '\"');
>>> -             getc (state_file);
>>>               break;
>>>             case '\\':
>>>               obstack_1grow (&bstring_obstack, '\\');
>>> -             getc (state_file);
>>>               break;
>>>             case ' ':
>>>               obstack_1grow (&bstring_obstack, ' ');
>>> -             getc (state_file);
>>>               break;
>>>             case 'x':
>>>               {
>>> -- 
>>> 2.36.0
>>>
>>
> 

Reply via email to