From patchwork Wed Jul 19 18:59:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John David Anglin X-Patchwork-Id: 122765 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c923:0:b0:3e4:2afc:c1 with SMTP id j3csp2641102vqt; Wed, 19 Jul 2023 12:00:37 -0700 (PDT) X-Google-Smtp-Source: APBJJlFmk1D+qBVsIFn5ru4bgqL/L+PK+Bfd2ztQg5l54hnXL0ThXAA87n7OOzvfhgQGnf6tgaiS X-Received: by 2002:aa7:c1d4:0:b0:51e:5251:8f45 with SMTP id d20-20020aa7c1d4000000b0051e52518f45mr3067589edp.4.1689793236753; Wed, 19 Jul 2023 12:00:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689793236; cv=none; d=google.com; s=arc-20160816; b=wQUppcoPskvruASGAlI9loXKJSbl9Hq2+5g3fNnGfxmImG6/QJ/WaPoQO9940/IXb8 06Cua2mpsvDDFqpf56ldvFOIqup2c/9n5Dmc5GdEeuVkZoFyxWsgidbAWxPgCcyVhMrV kbF9l+8+Pkw1OegAuDSjNbcgeiXxlmN8XhDhBJpat9ZNm4cvhy+pKTRSgs7E/5LsXa56 zUZp0ImcdTbDbmKCk/C1qvhWO5M3KhrOpPLY0d7yLEeX2bo1L0h/XGgO1Jh0ovsn+gSh w6x6F3ycO1NOoOYTtQJkE7if95TjkfYb5zIjjDibJulDaMNEo+z4JjPlBWfksGdnoZqS ZBXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-disposition :mime-version:message-id:subject:to:from:date:dmarc-filter :delivered-to; bh=wsIR5Is8t9ZwcYgbY1Bb2Xb/GAmHOMFcg9H4kHjzV/w=; fh=I8vRajUle7A/MI2ZMBTL2kcUplufj9DdTNXW2XexLj4=; b=upRWiu3pPEneB+XIJ/KU7PbEbI2m4xxPs3R+PM0giZiqkt8DW70ij090kyl5LndXTv UtWnxXfNbB5Hn7zb9CxjGVBLwRThDVPXUBKEGlKQQFKkkFLvlDwkRqFKtNOfsgeLL4hN AD0vzJwRWrmHAJD3w8BMIIGfpy1YBHblY2h74xPcS3foZx9ndlABxUPblSP2OW5rXcZ4 xMmQvlrgg3EKUtVHRZgerwUe8fY2uTewRLiBhtvp9S66DoEJgUSfNnAEaJQBSIfLFgQm x3lH5XH49JYgNsAas4Ijs6VLdudb46uvAWn/Bvpg9SB/4uVRBXZ4QbPYhIT4BvPrS5gq flKg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id n19-20020aa7c693000000b0051df73ddeffsi3447658edq.358.2023.07.19.12.00.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Jul 2023 12:00:36 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 806B13856DC6 for ; Wed, 19 Jul 2023 19:00:23 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from dellerweb.de (unknown [IPv6:2a02:c207:3003:236::1]) by sourceware.org (Postfix) with ESMTPS id B6E7D3858C33 for ; Wed, 19 Jul 2023 18:59:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B6E7D3858C33 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=parisc-linux.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=parisc-linux.org Received: from mx3210.localdomain (unknown [142.181.186.176]) by dellerweb.de (Postfix) with ESMTPSA id 24C071600462; Wed, 19 Jul 2023 20:59:55 +0200 (CEST) Received: by mx3210.localdomain (Postfix, from userid 1000) id D740422012C; Wed, 19 Jul 2023 18:59:52 +0000 (UTC) Date: Wed, 19 Jul 2023 18:59:52 +0000 From: John David Anglin To: GCC Patches Subject: [PATCH] Use strtol instead of std::stoi in gensupport.cc Message-ID: MIME-Version: 1.0 Content-Disposition: inline X-Spam-Status: No, score=-8.8 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, 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: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771876632864288843 X-GMAIL-MSGID: 1771876632864288843 Tested on trunk with hppa64-hp-hpux11.11. Okay? Dave --- Use strtol instead of std::stoi [PR110646] Implementation of std::stoi was overlooked on hppa-hpux, so use strtol instead. 2023-07-19 John David Anglin gcc/ChangeLog: PR bootstrap/110646 * gensupport.cc(class conlist): Use strtol instead of std::stoi. diff --git a/gcc/gensupport.cc b/gcc/gensupport.cc index 959d1d9c83c..87bcf5ee441 100644 --- a/gcc/gensupport.cc +++ b/gcc/gensupport.cc @@ -640,7 +640,7 @@ public: name.assign (ns, len); if (numeric) - idx = std::stoi (name); + idx = strtol (name.c_str (), (char **)NULL, 10); } /* Adds a character to the end of the string. */