From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 86DB43856275; Tue, 18 Apr 2023 21:42:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 86DB43856275 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1681854146; bh=SNkQYU/OMB9n4zpDnbUnV1nPqjpDQ1dA/QepD80eL6s=; h=From:To:Subject:Date:In-Reply-To:References:From; b=uQZfBkrr2HV/73TKMRF0MXrHAei4K2t+fXKwFZxuxvO7qBl8hG1yDJzaw0pUyQAkc czgBcjNfLvqCXAoS7ALgUdnqePNAKNUww2eLyHVK8lFTFWkEnHMAESBPHG9D//8x1m Ny771//HCiKLtAKX7gw7devh15MOn1F48kvFqB1U= From: "bruno at clisp dot org" To: glibc-bugs@sourceware.org Subject: [Bug libc/30371] C2x strtol binary constant handling is incomplete Date: Tue, 18 Apr 2023 21:42:26 +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: bruno at clisp dot org 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: 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 --- Comment #3 from Bruno Haible --- (In reply to Eric Blake from comment #1) > Note that C2X has not yet decided what to do about strto*l parsing with a > binary prefix. ... This is a > SILENT change in runtime behavior, based on which version of the standard > you build against. Yes, but the fact that it's a change in runtime behaviour is handled by the introduction of __isoc23_strto*, __isoc23_wcsto* in Joseph Myers' patch https://sourceware.org/git/?p=3Dglibc.git;a=3Dcommitdiff;h=3D64924422a99690= d147a166b4de3103f3bf3eaf6c . If "Rejected" (as in comment #2) means that the final ISO C 23 will have the same wording as https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3088.pdf = (the latest draft from 2023-01-24), then the wording there (=C2=A7 7.24.1.7, pag= e 358 =3D 377/757) means that when parsing the input string "0b", only one character shall be consumed, like for the input string "0x". That is what this BZ and= its proposed patch are about. > The final version of C2X may state something different than in the draft, > and glibc may have to course-correct yet again. True. But it's very unlikely that the final version of C2X will specify tha= t in when parsing "0b" two characters shall be consumed, while when parsing "0x" only one character shall be consumed. --=20 You are receiving this mail because: You are on the CC list for the bug.=