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 r13-1129] gengtype: do not skip char after escape sequnce Date: Thu, 16 Jun 2022 06:24:00 +0000 (GMT) [thread overview] Message-ID: <20220616062400.C1DF33858280@sourceware.org> (raw) https://gcc.gnu.org/g:4a0aad8f27073c1cce97fa02a315414e867afa76 commit r13-1129-g4a0aad8f27073c1cce97fa02a315414e867afa76 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 2c7f642cd3d..770abab0bd5 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-06-16 6:24 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=20220616062400.C1DF33858280@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: linkBe 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).