From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E86683858C74; Tue, 18 Apr 2023 21:08:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E86683858C74 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1681852094; bh=8ei/3YERucXee1aQaixDUMu5FS4a89wjJWDYAegVVAc=; h=From:To:Subject:Date:In-Reply-To:References:From; b=EPKyNOFINfd+CMtA6V9+BUVwWAbpDNrBahhnKw1e2CBBZ3XhfxuiVdGxINlJvpb/U mcbKwrf6MVAge0mPtWy67x5QtMEqTOS47PZ4I9UkIT73WCDrdMuDcLMLiEzgRCdrKj bd9Utn6KLxdcb5GcFgnZfbhpXN135uINcz7DFmvs= From: "eblake at redhat dot com" To: glibc-bugs@sourceware.org Subject: [Bug libc/30371] C2x strtol binary constant handling is incomplete Date: Tue, 18 Apr 2023 21:08:14 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: libc X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: eblake at redhat dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D30371 Eric Blake changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |eblake at redhat dot com --- Comment #1 from Eric Blake --- Note that C2X has not yet decided what to do about strto*l parsing with a binary prefix. Consider: strtoul("0b1", &end, 2); In C17, this is required to return 0 and set end to "b1"; if C2X adds binary parsing, it would be required to return 1 and set end to "". This is a SIL= ENT change in runtime behavior, based on which version of the standard you build against. https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3072.htm#there-are-semant= ic-changes-and-inconsistencies-for-strtol-scanf-and-similar-functions The final version of C2X may state something different than in the draft, a= nd glibc may have to course-correct yet again. --=20 You are receiving this mail because: You are on the CC list for the bug.=