From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id EE8BE395A445 for ; Thu, 2 Jun 2022 19:44:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org EE8BE395A445 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-372-uWYCn8UxPCesDFw89bn2qA-1; Thu, 02 Jun 2022 15:44:40 -0400 X-MC-Unique: uWYCn8UxPCesDFw89bn2qA-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 6BA25804193 for ; Thu, 2 Jun 2022 19:44:40 +0000 (UTC) Received: from t14s.localdomain.com (unknown [10.2.16.187]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4451982882; Thu, 2 Jun 2022 19:44:40 +0000 (UTC) From: David Malcolm To: gcc-patches@gcc.gnu.org Subject: [committed] json: fix escaping of '\' Date: Thu, 2 Jun 2022 15:44:38 -0400 Message-Id: <20220602194438.843506-1-dmalcolm@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-Spam-Status: No, score=-11.8 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Jun 2022 19:44:43 -0000 Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to trunk as r13-965-g4f9ad0b4b0a8c7. gcc/ChangeLog: * json.cc (string::print): Fix escaping of '\'. --- gcc/json.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/json.cc b/gcc/json.cc index 3bf9b61a641..974f8c36825 100644 --- a/gcc/json.cc +++ b/gcc/json.cc @@ -207,7 +207,7 @@ string::print (pretty_printer *pp) const pp_string (pp, "\\\""); break; case '\\': - pp_string (pp, "\\n"); + pp_string (pp, "\\\\"); break; case '\b': pp_string (pp, "\\b"); -- 2.26.3