Skip to content

Commit

Permalink
gengtype: do not skip char after escape sequnce
Browse files Browse the repository at this point in the history
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.

gcc/ChangeLog:

	* gengtype-state.cc (read_a_state_token): Do not skip extra
	character after escaped sequence.
  • Loading branch information
marxin committed Jun 16, 2022
1 parent ab66fd0 commit 4a0aad8
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions gcc/gengtype-state.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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':
{
Expand Down

0 comments on commit 4a0aad8

Please sign in to comment.