From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D6AEF3858401; Thu, 1 Jun 2023 09:39:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D6AEF3858401 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1685612354; bh=TThGyLFWAT1jdX6s7XVqCock3DgEsAqcjfhpLI1dE3w=; h=From:To:Subject:Date:In-Reply-To:References:From; b=JRgqRuQWNT/psbsyxVY/i95dbq6AqjhxWURLIuZ263rhOy38eDDbG6ymqtBm2ix3J XenkgrBTu/kCT4uLHtnQDOeI9NdqVHMjyoSK/Q7MT60L3anap6q+gICR5ZAKUXuleC q+LXTKYVWFBA5+hGeb0/yxIdxf2ot7fFrcHbyQwU= From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug other/44574] Avoid use of atoi Date: Thu, 01 Jun 2023 09:39:13 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: other X-Bugzilla-Version: 4.5.0 X-Bugzilla-Keywords: internal-improvement X-Bugzilla-Severity: normal X-Bugzilla-Who: redi at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D44574 --- Comment #4 from Jonathan Wakely --- Now that we have C++11 we could use std::stoi, std::stol, std::stoul etc. .= .. except that they throw exceptions to report out of range values :-( std::from_chars isn't available until C++17.=