public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Martin Liska <marxin@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc(refs/users/marxin/heads/gentype-escape-fix)] gengtype: do not skip char after escape sequnce
Date: Wed,  4 May 2022 14:23:15 +0000 (GMT)	[thread overview]
Message-ID: <20220504142315.5ABAF385625A@sourceware.org> (raw)

https://gcc.gnu.org/g:dacdf4e16cee3eb30dc5f08d0926bb10b73e97a7

commit dacdf4e16cee3eb30dc5f08d0926bb10b73e97a7
Author: Martin Liska <mliska@suse.cz>
Date:   Wed May 4 16:21:45 2022 +0200

    gengtype: do not skip char after escape sequnce
    
    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.

Diff:
---
 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':
 		  {


                 reply	other threads:[~2022-05-04 14:23 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220504142315.5ABAF385625A@sourceware.org \
    --to=marxin@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).